I am working on an e-commerce website with a category page for each model in stock.

The category page let the visitor compare the main characteristics of products before accessing more details on the product pages.

When the visistor access a category, if there is only one product in it, he is directly redirected to the product page, where he will find all necessary information about the unique available product for the given category.

The redirection is performed through the PHP function header("Location:".$url_of_the_product_page);

By default, the HTTP header set by the header() function is a 302 Temporary redirection.

Basically, I like the fact that the (temporarily unique) product is reached by passing through its category, as it keeps the navigation logic and makes the code easier to understand and maintain.

As the stock is kept as diverse as possible, there is a unique product in stock for many models. In Google Search Console, this situation causes a high percentage of pages that were detected but not indexed because of the redirection.

The fact that the one-product-category pages are not indexed is not a problem in itself, but I assume it is not that good for SEO as search engines detect the large number of redirections.

One understands that, as for the logic, the one-product-category pages themselves never moved. They will just appear once more than one product is present in them. But on the technical side, things are viewed differently.

I tried to improve the situation by adding a sitemap of categories, where only the categories containing at least two products are listed, and removing some links to the one-product categories. The laters are however still reachable from the list of the models in stock.

All products are listed in sitemaps, so that they can be found even without passing through the categories.

I wonder if I should rather:

A. use some slightly "black hat" technique of cancelling the PHP redirection if the visitor is detected as a bot, so that the category page is made visible to bots even if there is only one product in it. This would make the category page indexable and it would likely stay low in the ranking because of the little information it contains.


B. add a rel="nofollow" attribute to the links to the categories that contain only one product.

Of course, I don't want to penalize the category pages for later time in case they would contain more products.

Although I am fundamentally against tricking, I have a small preference for A in this context, but would like to hear advice or ideas for SEO experts.

  • Why even have categories with one product in them? I wouldn't create categories until they have at least 3 products. Mar 24 at 19:58
  • Or create a category misc for these products. Mar 25 at 20:30
  • @Stephen O.: If selling 2nd-hand goods or spare parts, you don't know in advance how many items you will have for a given model or spare part. Imagine a website selling used laser printers, with in stock 45 items of themodel #1, 7 items of the model #2, and only 1 item of the model #3. On the category pages (one per model), you may provide visitors a comparative table where the visitor can sort items of a given model per "Number of prints", "Remaining toner", "Remaining life of fuser", "Price", a.s.o. When the stock drops to 1, as for model #3, the website redirects to the last unique product.
    – OuzoPower
    Mar 26 at 11:29


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.