• Resolved jdphoenix

    (@jdphoenix)


    Hello,

    On browsers, our URLs appear to force the correct protocol (https://www.allvalleytransportation.com). When I test using https://httpstatus.io/, canonical inconsistencies and errors occur.

    Would you advise manually entering the correct canonical on each post/page using the “advanced” section of YOAST? Do you feel this would solve the issue?

    Here is what I added to our .htaccess file….

    RewriteEngine on

    # Redirect HTTP with www to HTTPS with www
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} ^www. [NC]
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    # Redirect HTTP without www to HTTPS with www
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} !^www. [NC]
    RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    # Redirect HTTPS without www to HTTPS with www
    RewriteCond %{HTTPS} on
    RewriteCond %{HTTP_HOST} !^www. [NC]
    RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    Force trailing slash
    RewriteCond %{REQUEST_URI} /+[^.]+$ RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]

    The website is on GoDaddy using a SECURI firewall.

    Any suggestions would be greatly appreciated. Thanks so much.

    • This topic was modified 1 year, 9 months ago by jdphoenix.

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

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

    (@maybellyne)

    Hello @jdphoenix

    Thanks for reaching out regarding your canonical URL. For your homepage, I don’t see inconsistencies as it’s correct:

    <link rel="canonical" href="https://www.allvalleytransportation.com/" />

    First, I’d like to mention that you don’t need to set a URL in the canonical URL field of the advanced tab of the Yoast SEO meta box. The Yoast SEO plugin uses self-referencing canonical URLs, so it picks the URL of the page.

    Testing with httpstatus.io, there’s a 403 – forbidden, though the URL loads fine in the browser.

    Can you tell me what you are trying to achieve with your edits in your .htaccess file? Is this to correct the 403 – forbidden error? Can you let me know what errors you received in httpstatus.io?

    Thread Starter jdphoenix

    (@jdphoenix)

    Hi Maybellyne,

    Thank you for your reply. I reached out to Google support forum and someone said the 403 on the tool, is most likely related to the GoDaddy Firewall. He also provided me with a better redirect script to force “www” and “https”. I think everything is correct now.

    Plugin Support Maybellyne

    (@maybellyne)

    This thread was marked resolved as the original poster confirmed the issue no longer occurs on their site.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Canonical URL Question…’ is closed to new replies.