• Resolved capeweather

    (@capeweather)


    Hello,

    Searching for help and do not know where else to look on the Yoast website. We have a weather plugin that searches every state, city, zip code throughout the united states?and all of?the?pages are somewhat similar but have different?content. The canonical URL always defaults to what you see below whenever there is a search. Sharing the search query of a location always defaults to this URL as well. We would like to define each canonical URL so it reflects the output.

    https://capeweather.com/weather

    <link rel=”canonical” href=”https://capeweather.com/weather/” />

    What we would like to happen is, for example, if there is a search for NEW YORK, NY, we would like to canonical out to reflect what the URL is which would be:

    https://capeweather.com/weather/us/NY/cities/New York/ 

    
    <link rel="canonical" href="?https://capeweather.com/weather/us/NY/cities/New?York/???" />
    
    

    Every query defaults to /weather instead of the actual city, state or zip code.

    Is there any solution for this? Thank you for your help.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Rohan Sadanandan

    (@rohans123)

    Hi @capeweather

    Thanks for reaching out.

    We would like to let you know that the internal search results pages are set to?noindex?by the Yoast SEO plugin. You can read more?here.

    So when a page is set to noindex, it will not have the canonical tag you expect it to have.

    Thread Starter capeweather

    (@capeweather)

    Ok thank you. I have checked all of the settings and they are enabled for search “Show in search results” after referencing this page. https://yoast.com/help/how-do-i-noindex-urls/#group

    What else could be happening? Can you provide a screenshot of noindex since I cannot locate it in the page source of any of our pages?

    Thank you

    Plugin Support devnihil

    (@devnihil)

    @capeweather Thanks for your reply. We reviewed the source code of the search results from the /weather page and found that the robots meta tag is set to index.

    As for changing the canonical URL, you can programmatically change the canonical URL value using the wpseo_canonical filter. You can view the developer documentation on this topic here, as well as some code example usage can be found?here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Numerous canonical URL’s with same output’ is closed to new replies.