The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. On-Page / Site Optimization
    4. SEO, 301s & backslashes at end of URL

    SEO, 301s & backslashes at end of URL

    On-Page / Site Optimization
    5 3 319
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MSpencer
      MSpencer last edited by

      Wordpess started adding "/" (slashes) at the end of my urls and I've left them up for some time.  Will removing them hurt search rankings or do I need to do a 301 redirect?

      For example - www.site.com/page1/ changed to www.site.com/page1

      Are there any other ramifications I may not be thinking about besides just search rankings.

      1 Reply Last reply Reply Quote 1
      • Malika1
        Malika1 last edited by

        So does this mean that you can access the same content with and without '/' ?

        This would mean duplicate content and duplicate content isnt really liked by Google. You can redirect these urls to the preferred one by using htaccess

        There should only be one version live.

        MSpencer 1 Reply Last reply Reply Quote 0
        • MSpencer
          MSpencer @Malika1 last edited by

          Will doing so have any impact on rankings or can I just make the full switch all at once without 301's.

          1 Reply Last reply Reply Quote 0
          • Mobilio
            Mobilio last edited by

            So, this is HUGE technical SEO mess.

            There are two chances - hosting or plugin:

            1. Hosting - you can fix this with .htaccess quick. There are lot of examples in internet about adding or removing slash in end of url. You need to check and recheck your .htaccess or webserver configuration.
            2. Plugin - sometime when WP update their plugins some of them comes with something more than bugfix or improvement. This is how they think "shouldn't hurt anybody", but in reality hurt ANYBODY because broke things. You need to try disable plugins one-by-one and see is this caused from them. This can be caused also from theme, WP itself and/or some custom code.

            This is cause of problem. But fix is hard because you need evaluate approx time of chance. There are two cases:

            1. If this happen soon you should fix it ASAP because for bots old pages are missing (you need to confirm that, please check, sometime they can 301 to new page).
            2. If this happen few months ago and rankings wasn't lost then you can leave it in new format (do also .htaccess fix!). If rankings was lost then you can try to fix this (and also .htaccess fix!). It's difficult decision anyway.

            As you can see everything dependent how long is this change and what damages already make. Try to see in SearchConsole more info about crawl and ranking.

            I will save you little time with code for removing AND adding trailing slashes:
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)/$ /$1 [L,R=301]

            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*[^/])$ /$1/ [L,R=301]

            First code remove /, second code add / to urls. You also need to check canonicals, sitemaps and fix them according changes.

            And one tip. You should always install in WP some plugin for backups. Period. You wasn't first nor last person in the world with situation "something happens". Of course one weekly backup cost you a penny and can save many hours of debugging or trying to fix things. There are many plugins in market with many different features so i can't give advise what will fit to your needs.

            MSpencer 1 Reply Last reply Reply Quote 1
            • MSpencer
              MSpencer @Mobilio last edited by

              Thank you so much!

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • Q& A section - SEO perspective
                ronell-smith
                ronell-smith
                2
                5
                249

              • URL Path. What is better for SEO
                RafalJ
                RafalJ
                0
                6
                1.2k

              • What should be the length of page url from seo perspective?
                JSTRANDELL
                JSTRANDELL
                0
                3
                3.4k

              • International SEO (USA & UK)
                Dan-Lawrence
                Dan-Lawrence
                0
                4
                383

              • Changing to Friendly SEO Urls
                MarketingOfAmerica
                MarketingOfAmerica
                0
                5
                139

              • URL STRUCTURE & RE-WRITING
                HiveDigitalInc
                HiveDigitalInc
                0
                2
                550

              • Maximum length of a URL for good SEO?
                dignan99
                dignan99
                0
                4
                3.7k

              • Does it matter if your URL ends in .net or .com?
                SparkplugDigital
                SparkplugDigital
                0
                4
                1.9k

              Get started with Moz Pro!

              Unlock the power of advanced SEO tools and data-driven insights.

              Start my free trial
              Products
              • Moz Pro
              • Moz Local
              • Moz API
              • Moz Data
              • STAT
              • Product Updates
              Moz Solutions
              • SMB Solutions
              • Agency Solutions
              • Enterprise Solutions
              • Digital Marketers
              Free SEO Tools
              • Domain Authority Checker
              • Link Explorer
              • Keyword Explorer
              • Competitive Research
              • Brand Authority Checker
              • Local Citation Checker
              • MozBar Extension
              • MozCast
              Resources
              • Blog
              • SEO Learning Center
              • Help Hub
              • Beginner's Guide to SEO
              • How-to Guides
              • Moz Academy
              • API Docs
              About Moz
              • About
              • Team
              • Careers
              • Contact
              Why Moz
              • Case Studies
              • Testimonials
              Get Involved
              • Become an Affiliate
              • MozCon
              • Webinars
              • Practical Marketer Series
              • MozPod
              Connect with us

              Contact the Help team

              Join our newsletter
              Moz logo
              © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
              • Accessibility
              • Terms of Use
              • Privacy