I am building a "dynamic pages" system.

I have a /page?slug=some-slug pattern.

This page checks a database with the slug and if it finds some entry it will redirect with 301 to the found real URL that can be anything within same domain, example example.com/blabla/some-slug.

The /page will either redirect 301 permanantely or return 404. It will never have content.

Should I return together with the 301 status code and redirect also the header X-Robots-Tag: noindex? I want the destination of the 301 to be indexed! and that page does not have any noindex. I just don't want search engines to index /page?slug=some-slug. This is like a search to help with internal links and navigation in the site but must never be indexed.

Full example:

I redirect a user via email to example.com/page?slug=page=1 returns status 301, no-index header, location: example.com/blabla/page-1 page-1 opens with 200 response code, indexable and has all the content

In this example I want search engines to

  1. ignore and never index example.com/page
  2. index the destination example.com/blabla/page-1

Will my proposed solution work fine or the noindex in the page that is returning the redirect might affeect SEO for the destination page as well?

My research so far https://www.seroundtable.com/google-on-noindex-with-redirects-34931.html I haven't found a conclusive answer and I need such because it is super important that the pages are indexed properly.

  • I read your supporting post and Google's answer is vague. It would appear that this might work within the same domain, but would be problematic outside of the domain. However, have you tried just creating a test page to see if the redirect/no index option works?
    – Trebor
    Commented Aug 1, 2023 at 16:25
  • How to test that ? I have dependency on google. The redirect works fine I have tested it Commented Aug 2, 2023 at 14:20
  • Kristi, have you looked at Google Search Console? search.google.com You can enter in both URLs to view what Google is doing with your URLs. Enter in the page with your querystring and also the redirected page and determine if the noindex applied to anything.
    – Trebor
    Commented Aug 4, 2023 at 22:36
  • 1
    Ok thanks for the tip. I haven't looked into that because did not implement this yet without being sure that will not mess anything. Was just being super careful. Maybe I will just implement then check in google how it performs and in case of issue fix it.. Commented Aug 6, 2023 at 11:52

3 Answers 3


A 301 redirect should be suffice. It says to Google that the page is obsolete, avoid indexing, and re-direct users to a more relevant destination.

Finding that exact explanation from Google has been tricky, but the following under the Redirects and Google Search documentation is close:

  • You've moved your site to a new domain, and you want to make the transition as seamless as possible.
  • You're merging two websites and want to make sure that links to outdated URLs are redirected to the correct pages.
  • You removed a page and you want to send users to a new page.

Other articles and questions have been discussed with a similar conclusion:

There's a few helpful quotes from the second article:

Pages with HTTP 301 status codes shouldn’t get organic traffic because they shouldn’t be in Google’s index. If such pages are getting traffic, it means that Google hasn’t yet seen the redirect.

Now, if you only recently added the 301 redirect, this likely isn’t much of an issue. Google should see it during their next crawl, after which they should deindex the page.

Remember, if the page was already indexed before you added a 301, it will take time to be removed from Google.

  • Thanks Pete. So if I understood correctly using a 301 redirect from a -> b ensures that a is never indexed (same as returning header robots noindex), and also allows b to index properly (b has no noindex mentioned anywhere). That is great than Commented Aug 2, 2023 at 14:21

Don't do it this way - for one, it sounds like you're opening up the possibility of having a billion pages and a ton of duplicate or near-duplicate content. The fact that you're both noindexing and redirecting also seems very suspicious.

  • hm.. maybe I did not express clearly in my question but I do want to index the final destination. I just don't want to index the page that is doing the "search part" which is /page?slug=someslughere. This one I don't want to index, but this redirects to another page which must be indexed Commented Aug 2, 2023 at 21:36

The way I understand it, to stop a page getting indexed you have to ensure

  1. Have no internal links point to it.
  2. Have no external links point to it.
  3. You put in a noindex tag on it.

You have the additional problem that you want to use a param on this page, which means it has an endless combination of urls. Google takes the param together with the base url as a unique page.

Dont use params

If the above three points dont work then I would suggest that you dont have a page like that. Redesign your system. I have a search page as well, but without params. Use the session to store the information required and use a POST rather than GET from your search page. The results page (it could be the same as the search page) shows a list of matching urls using <a> tags. And the user clicks on one. And dont link to the search or result page with a param.

Using params

If you can't redesign it this way then use a param but use session as well. In the search page you put a token in your session, the results page detects it and does the redirection. When Google accesses it directly, the session token is missing and it returns 404.

  • Thanks for the response. I think you did not understand 100% my question. It is true that I don't want to index the search page, but I want the redirect destination to get indexed. "hm.. maybe I did not express clearly in my question but I do want to index the final destination. I just don't want to index the page that is doing the "search part" which is /page?slug=someslughere. This one I don't want to index, but this redirects to another page which must be indexed – " Commented Aug 3, 2023 at 22:16

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.