Do not index url parameters….

#223887
  • Resolved Briany Hearne
    Rank Math free

    Hi Guys,

    So my site displays posts in modal windows with the parameter /?modal=1 appended to the url.

    Google is indexing these pages and I want them to stop….. but of course I do want them to index the plain url ….

    Suggestions please?

    Many thanks,

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    You can simply prevent Google from indexing these URL parameters by excluding them in your robots.txt file.

    Please add this configuration to your robots.txt:
    Disallow: /*?modal=*

    That should resolve your issue. We are looking forward to helping you.

    Thanks Jeremy,

    So do i add that inside wp-admin using Rank Math……. or do I manually add it to the file directly?

    Ankit
    Rank Math business

    Hello,

    Since Rank Math manage the robots.txt file virtually, you will need to edit the file by heading over to WP Dashboard > Rank Math > General Settings > Edit robots.txt

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Ok great.

    So I googled a bit and have amended your code to this….

    Disallow: /*?*

    My expectation is that this will stop Google from indexing ANY URLs with ANY parameters.

    I have added exactly that code here…

    WP Dashboard > Rank Math > General Settings > Edit robots.txt

    Am i doing it all right?

    Prabhat
    Rank Math agency

    Hello,

    Yes, that disallow statement would tell the bots not to crawl any URLs with parameters.

    You may double-check if the statement is updated by visiting the robots.txt file using the URL your-domain.com/robots.txt (please replace “your-domain.com” with your actual domain).

    If the file is updated properly, then everything would be fine from your end.

    Hope that helps.

    Thank you.

    Yes that helps, thank you all very very much. Great support.

    Prabhat
    Rank Math agency

    Hello,

    We are super happy that we could address your concern. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind us 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 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 7 replies - 1 through 7 (of 7 total)

The ticket ‘Do not index url parameters….’ is closed to new replies.