• Resolved advertino

    (@advertino)


    If I add a query mark to the url on my website and then a meaningless set of numbers, there is no redirection to the main url.

    That’s what I mean:
    https://site.com?845fuy438fy349f348yf
    https://site.com/category/page/?horhcohghcv90yh09c3

    This is what I want to get:
    https://site.com
    https://site.com/category/page/

    How can I set this up so that any queries are redirected to the main url? I see a lot of discussion on this topic here, but I couldn’t find a single example of how this should be set up correctly. Including I looked at the Q&A site and the manual for this plugin. I couldn’t find an answer to my question other than “use regular expressions”. Why can’t you make a single checkbox – “all queries redirect to the main address”?

    In the settings I could only find “Default query matching” and selected “Ignore query parameters”, but it does not work.

    How to fix it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Godley

    (@johnny5)

    It’s not something you need to do. WordPress handles this in the correct way and the easiest thing to do is to let it do its job.

    On top of that it is likely that performing such a redirect will break some functionality on your site.

    Thread Starter advertino

    (@advertino)

    Unfortunately, WordPress doesn’t do anything about it. The fact is that such pages create duplicate pages on the website, which negatively affects search engine optimization. I don’t use website search, so I don’t think anything will be broken.

    Plugin Author John Godley

    (@johnny5)

    WordPress doesn’t do anything about it

    That’s the correct thing to do. WordPress sets the canonical URL on every page and this means you don’t need unnecessary redirects for query parameters.

    Query parameters are used by different parts of WordPress, including the admin interface. I would strongly advise not trying to redirect things that don’t need redirecting.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redirect query to main URL – how to do it?’ is closed to new replies.