locked
Canonical Tags Not Matching Redirects RRS feed

  • Question

  • User-1894393892 posted

    Hello All,

    First time here, thanks for having me.  I hope this is in the correct section.  Please correct me if not.

    I have a question.  I set up a redirect for eliminating and redirecting upper case and to lower case and adding a forward trailing slash for SEO purposes.  This worked on most products, I had to go in and manually edit some, not perfect but it is working much better.

    Here is my question.  The redirect is properly redirecting most for example, https://domain.com/products/p/example-product/ from other upper case and non-trailing slash iterations.  BUT, the issue I have having is that the canonical tag on the page has the old URL. 

    So on the page seen above, https://domain.com/products/p/example-product/, redirects fine from say, https://domain.com/products/p/Example-Product, correctly.  But the page still carries the tag, <link id="CanonicalLink" rel="canonical" href="https://domain.com/products/p/Example-Product"></link>.  It is causing some site audit issues.

    I checked around and could not find my answer.

    Any ideas on how to fix this?  Any help is appreciated.

    Thanks!

    Tuesday, May 11, 2021 2:49 PM

All replies

  • User1065476709 posted

    Hi bmcintyre1,

    But the page still carries the tag, <link id="CanonicalLink" rel="canonical" href="https://domain.com/products/p/Example-Product"></link>.  It is causing some site audit issues.

    According to your description, I couldn’t understand your requirement clearly.

    Do you want to change the link in the page content through url rewriting? If so, then you need to use the outbound rule.

    https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/creating-outbound-rules-for-url-rewrite-module

    If I misunderstand your requirement, please post more details information about your requirement.

    Best regards,

    Sam

    Wednesday, May 12, 2021 7:45 AM
  • User-1894393892 posted

    Hello,

    Thanks for the reply.  Let me clarify.  Sorry if I was not clear.

    The redirect is working.  For the most part.  So any upper case or NON trailing slash populates the URL, that is fine.

    My issue is that in the backend, the canonical tag does not match the URL that it was redirected to.  

    So I theory in stead of the "old" url being displayed the canonical tag should be, <link id="CanonicalLink" rel="canonical" https://domain.com/products/p/example-product/></link>

    I hope I explained that properly.  The URL redirects are working fine, the canonical link tag is not correct.

    Any advise?

    Thanks

    Wednesday, May 12, 2021 12:14 PM
  • User1065476709 posted

    Hi bmcintyre1,

    So I theory in stead of the "old" url being displayed the canonical tag should be, <link id="CanonicalLink" rel="canonical" https://domain.com/products/p/example-product/></link>

    Your problem is in the backend, but url rewrite is to modify the url. what is your project? Have you posted to iis? Can you post a screenshot of the problem?

    Best regards,

    Sam

    Thursday, May 13, 2021 8:33 AM
  • User-1894393892 posted

    Hello!

    Thanks for your reply.  Please see attached.  You will see the URL that I am viewing the source on (yellow line below each URL) and also the URL that is being populated for the canonical tag.  They do not match.

    I got it on the URL rewrites, but how do we make sure the URL matches the canonical tag?

    Thoughts?

    Thanks

    Thursday, May 13, 2021 12:26 PM
  • User1065476709 posted

    Hi bmcintyre1,

    Thanks for your reply.  Please see attached.  You will see the URL that I am viewing the source on (yellow line below each URL) and also the URL that is being populated for the canonical tag.  They do not match.

    I got it on the URL rewrites, but how do we make sure the URL matches the canonical tag?

    This is an html page, if you want to change the content of the link, you still need to use the outbound rewrite rule I mentioned above.

    Create an outbound rewrite rule.

    Best regards,

    Sam

    Friday, May 14, 2021 7:19 AM