Support » Plugin: The SEO Framework » Incorrect search canonical

  • Hi,

    When wordpress does a search it sends us to .com?s=keyword

    However when you view the page source, the canonical is set to .com/search/keyword

    How can we just keep this as the normal ?s= variant?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi, selesti,

    We use WordPress’ own get_search_link() (source) function to generate this permalink.
    We consider this the correct canonical URL, as it is based on your permalink settings.

    WordPress doesn’t redirect users from ?s=query to /search/query for unknown reasons:
    https://core.trac.wordpress.org/ticket/40082

    Now, both URLs are correct, and both URLs should lead to the same page.

    You should filter the function mentioned above if you wish to change this URL. The SEO Framework isn’t the only plugin making use of this function, after all.
    But, I don’t recommend filtering it: It’ll increase your maintenance cost, and there’s nothing to gain from this.

Viewing 1 replies (of 1 total)
  • The topic ‘Incorrect search canonical’ is closed to new replies.