How to no index search pages

#85637
  • Resolved Ed Goldswain
    Rank Math free

    Hi. Firstly, love the plugin!

    I wondered if there’s a feature that would allow me to automatically add a noindex/nofollow tag to all pages on my site that have a certain URL element.

    The specific use case is that my site has a search box on every page, which when crawled leads to a duplicate page on a different URL. I’ve added a noindex to the search box, and all dupe pages are canonicalised, but I’d like to also add a noindex and no follow to these canonicalised pages, just to be extra safe!

    Example URLs below.

    • This topic was modified 4 years, 3 months ago by Ed Goldswain.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting Rank Math today.

    Rank math has an option to noindex Search results. You can enable the option in Rank math > Titles & Meta > Misc Pages
    img

    Looking forward to helping you. Thank you.

    ​​​​​​

    Thanks Michael, yes, I have this option enabled already… but the example URL I’ve provided that ends in ?s= isn’t actually a search results page, just access by spiders via the search box on each page.

    Alberto
    Rank Math business

    Hello,

    I think the best way to disallow indexing those URLs would be adding the following line to your robots.txt file:

    Disallow: /*?s=$

    Looking forward to help you.

    Ah yes, of course. That should do the trick – appreciate the help!

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘How to no index search pages’ is closed to new replies.