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. Technical SEO Issues
    4. Do trailing / in URLs matter?

    Do trailing / in URLs matter?

    Technical SEO Issues
    3 3 559
    • 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.
    • TheOceanAgency
      TheOceanAgency last edited by

      I was wondering if search engines see duplicate content on two different URLs if the content is available via www.xyz.com/services or www.xyz,com/services/

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

        Hi,

        Technically yes,

        Be sure to back up your .htaccess before trying but this below should remove the trailing slash (by redirecting / to non slash), and fix duplicate if you have it.  But like i said back up first just in case 🙂

        #remove trailing slashes RewriteCond %{HTTP_HOST} !^\.domain\.com$ [NC] RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

        EDIT

        Since I am not full aware of your actual situation... Below is if you only want to redirect trailing slash on URI's that are past root (sub directories redirected, but www.example.com/ is left alone

        <code>RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_URI} (.*)$
        RewriteRule ^(.+)/$ http://www.domain.com/$1 [R=301,L]</code>
        
        1 Reply Last reply Reply Quote 1
        • BethA
          BethA last edited by

          We have a similar thread going, and I believe it may help resolve some of your questions concerning the trailing slash:  http://www.seomoz.org/q/trailing-slash-and-rel-canonical

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Home Page Being Indexed / Referral URLs /
            Andrew-SEO
            Andrew-SEO
            0
            2
            44

          • Adding a parameter to the URL / URL Stracture
            Roman-Delcarmen
            Roman-Delcarmen
            0
            2
            58

          • Redirect /label/ to /tags/
            Taiger
            Taiger
            0
            3
            143

          • Hey all -- ever seen a client with URLs that keep repeating the domain? Something like: client.com/client.com/client.com/subfolder-name. Any idea what glitch could cause that?
            rjonesx. 0
            rjonesx. 0
            0
            5
            103

          • What is the best practice to seperate different locations and languages in an URL? At the moment the URL is www.abc.com/ch/de. Is there a better way to structure the URL from an SEO perspective?
            irvingw
            irvingw
            0
            2
            64

          • /out/ URLs in GWMTs
            AgentsofValue
            AgentsofValue
            0
            2
            2.3k

          • Redesign existing websites / worried about urls / mapping
            Socialdude
            Socialdude
            0
            3
            581

          • Directory URL structure last / in the url
            DavidS-282061
            DavidS-282061
            0
            6
            1.4k

          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