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. Mixing hyphens and underscores in a url

    Mixing hyphens and underscores in a url

    On-Page / Site Optimization
    5 3 461
    • 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.
    • nyc-seo
      nyc-seo last edited by

      Hello.

      I am working on a site that was built with underscores in the urls, but only in the page names, not in the subdirectories. All the subdirectories have one-word names.

      So a typical url is "example.com/sub1/sub2/page_name."

      We would like to change the name of one of the subdirectories to a name that would be very useful for SEO, but this new name is a hyphenated word, let's call it "new-sub."

      If we changed "sub2" to "new-sub" then our url would have a mix of underscores and hyphens: example.com/sub1/new-sub/page_name. But if I used "new_sub" instead, google would read the words as connected with an underscore, instead of reading the subdirectory as a hyphenated word, which would be less useful for SEO.

      It seems like it might be a problem to have a hyphen in a subdirectory and underscores in the page names. But I want the SEO value of the hyphenated word.

      Any recommendations?

      Thank you!

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

        Matt Cutts did a video on this exact issue.

        http://www.youtube.com/watch?v=AQcSFsQyct8

        Generally, you should just stick to either underscores or hyphens and not mix the two.

        If you want to change all of the underscores to hyphens then make sure you 301 redirect all of the old urls to the new ones. This can be a total pain if your site is huge, but would be necessary if you change the URLs.

        nyc-seo 1 Reply Last reply Reply Quote 2
        • EGOL
          EGOL last edited by

          Any recommendations?

          If this was my site I would not worry about it.

          nyc-seo 1 Reply Last reply Reply Quote 1
          • nyc-seo
            nyc-seo @itrogers last edited by

            Thank you, Ian!

            1 Reply Last reply Reply Quote 0
            • nyc-seo
              nyc-seo @EGOL last edited by

              Thank you!

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • To avoid the duplicate content issue I have created new urls for that specific site I am posting to and redirecting that url to the original on my site. Is this the right way to do it?
                0
                1
                24

              • Duplicate URL errors when URL's are unique
                DirkC
                DirkC
                0
                2
                96

              • Better to hyphenate URL or no?
                George.Fanucci
                George.Fanucci
                0
                4
                173

              • Short URL's vs Optimised URL's
                MozAddict
                MozAddict
                0
                3
                68

              • Our urls for adwords are slightly different from current urls presented on site (weused htaccess to help create shorter urls). How important is it that the adwords url match the sitemap url for keywords on those pages?
                LesleyPaone
                LesleyPaone
                0
                2
                134

              • Hyphenated keyword rich domains - is a hyphenated .co.uk better than a non-hyphenatedlesser TLD such as .org?
                Wallander
                Wallander
                0
                4
                774

              • Replacing "_" with "-" in url, results in new url?
                loopyal
                loopyal
                0
                8
                21.0k

              • Is it worth changing urls with underscores?
                firstconversion
                firstconversion
                0
                3
                817

              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