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
- ignore and never index
example.com/page
- 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.