canonical tag error for query string based url.

#906699
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello, we apologize for the issue you are facing with the canonical tag error for your query string-based URL. The "Alternate page with proper canonical tag" status in Google Search Console indicates that Google has found multiple pages with the same canonical URL, which can happen with URLs that include query strings.

    To resolve this issue, you should ensure that the canonical tag on your page points to the main version of the URL that you want Google to index. Here are some steps you can take:

    1. Set the Canonical URL: In the Rank Math meta box, go to the Advanced tab and set the canonical URL to the main version of your product page without the query string. For example, if your main product page is `https://rankmath.com/canonical-url/ set that as the canonical URL.

      Canonical URL Option In Rank Math

    2. Use 301 Redirects: If you do not want the query string version of the URL to be accessible, consider using a 301 redirect to redirect users from the query string URL to the canonical version of the page. You can refer to this article on setting up single and multiple 301 redirects in Rank Math.

    3. Check for Duplicate Content: Ensure that there are no other pages with similar content that might be causing confusion for search engines. If there are, make sure they also have appropriate canonical tags pointing to the main version.

    4. Inspect in Google Search Console: After making these changes, use Google Search Console to inspect the URL and check if the canonical tag is correctly recognized by Google.

    For more detailed information, you can refer to our article on Alternate Page with Proper Canonical Tag Status in Google Search Console.

    If you have any further questions or need assistance, please feel free to reply to this ticket, and a human agent from our support team will assist you further!

    Sources:
    Alternate Page with Proper Canonical Tag Status in Google Search Console » Rank Math

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    The canonical URL of that page is pointing to your homepage which is correct to avoid duplication of content and hence you receive the warning from Google.

    You can either safely ignore the warning or block Google from crawling those URLs.

    Here’s how you can block Google from accessing those URLs:

    In your robots.txt file, add the following directives:

    User-agent: *
    Disallow: /?add-to-cart=*

    Here’s how you edit your robots.txt in Rank Math plugin: https://rankmath.com/kb/how-to-edit-robots-txt-with-rank-math/

    Hope that helps.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘canonical tag error for query string based url.’ is closed to new replies.