• Resolved jdphoenix

    (@jdphoenix)


    Hello,

    I’ve noticed a strange thing occurring on our website..

    When I type in a subpage URL without an ending “trailing slash”, it does not redirect or force the “trailing slash”.

    I have added a “force trailing slash” script on my .htaccess and it still does not work. It works on other sites.

    Here is the script:

    # Force trailing slash
    <IfModule mod_rewrite.c>
    	RewriteCond %{REQUEST_URI} /+[^\.]+$ 
    	RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
    </IfModule>

    I have contacted GoDaddy and they are not sure why it isn’t working either. Could this be a setting I missed using YOAST? Is this anything to even be concerned with related to SEO?

    Here is a video demo I created. The first site is the one in question. The other site works:
    https://www.loom.com/share/28d862ca0cf74a88a65e1ca1226afab4

    Here is a page as an example

    (Notice no trailing slash)..
    https://www.allvalleytransportation.com/phoenix-car-service

    Any help or suggestions would be great.

    Thanks so much

    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 about your trailing slash and canonical URLs. Yoast SEO automatically adds the trailing slash in the canonical URL by default. So, it’s not a problem whether the trailing slash is visible in the site URL or not. Search engines will follow the canonical URL generated by Yoast SEO.

    However, yours looks like a caching issue. For instance, if you add a query parameter to the URL without the trailing slash, thus bypassing the cache, it redirects to the trailing slash version.

    You may consider clearing the server cache first.

    Thread Starter jdphoenix

    (@jdphoenix)

    Okay, I think WP Rocket Support found out and resolved the issue. There was a conflict between my “trailing slash” redirect script and the code WP Rocket generates.

    Would you be so kind to check on your end to make sure everything is good now? Thanks!

    Here is a URL..
    https://www.allvalleytransportation.com/limousine-service

    • This reply was modified 2 years, 6 months ago by jdphoenix.
    Plugin Support devnihil

    (@devnihil)

    @jdphoenix Thanks for your reply.

    We checked on several URLs (limousine-service, phoenix-car-service, and contact-us) and all three appended the trailing slash as expected, so everything is looking good now.

    Since the issue is corrected, we are going ahead and marking this issue as resolved. But if you require any further assistance please let us know.

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