Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • MozCon

        Save on Early Bird tickets and join us in London or New York City

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

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

    1. Home
    2. Research & Trends
    3. Algorithm Updates
    4. Hyphens vs Underscores

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    Hyphens vs Underscores

    Algorithm Updates
    8
    16
    19020
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • BluespaceCreative
      BluespaceCreative Subscriber last edited by

      I am optimizing a site which uses underscores rather than hyphens as word separators (such_as_this.php vs. such-as-this.php). Most of these pages have been around since 2007, and I am hesitant to just redirect to a new page because I am worried it will cause the rankings to slip.

      Would you recommend changing the file names to be in hyphenated format and place 301 redirects on the pages with underscores, or stick with the existing pages? Is there anything else that would work better?

      Thanks!

      1 Reply Last reply Reply Quote 1
      • Dr-Pete
        Dr-Pete Staff @AlanMosley last edited by

        I'll give you that - it's true that the result highlighting alone doesn't prove Google is viewing "shop ipad" as 2 words for ranking purposes. The tough part is separating out why these pages rank - I've seen plenty of URLs with underscores rank perfectly well, but there's no way to prove it isn't on other factors.

        I think we're generally agreeing, though, that the potential risks probably outweigh what would probably be a very small boost at best. I'm also a little hesitant on having some pages with dashes and some with underscores, but that's probably just the UX side of me - it feels messy.

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

          Some time ago I've changed all my urls from underscores to hyphens and I've lost some of my ranking for a while. After about a year we are back to where we were originally. I think it is a good idea to have it hyphened, but if you have good ranking it's really just a question whether they bother you much enough to go through a possible rank drop for a little while.

          It's worth to mention that I wasn't bothered with doing the 301 redirect due to the large number of pages being affected, but instead I've started blogging more and the new content was quickly picked by the engines and helped the site to recover.

          1 Reply Last reply Reply Quote 0
          • AlanMosley
            AlanMosley @Dr-Pete last edited by

            All due respect Dr Pete, this does not show that shop_ipad in the url is seen as shop ipad, only that it bolds in the results. this would be 2 different bits of technology doing these jobs.

            Doc, I think you missed this video.

            Matt stated this only a few months ago, http://www.youtube.com/watch?v=AQcSFsQyct8

            He states for the forseeable future it wont be changing.

            I agree its a small factor, and i suggested, only fix it on pages that dont have external links.

            Dr-Pete 1 Reply Last reply Reply Quote 0
            • Dr-Pete
              Dr-Pete Staff last edited by

              This is a great debate and some good comments all around, but I do think it's important to keep in mind that Matt's statements were from 2005 and 2009, and even the 2009 wording was a bit more nuanced. I strongly suspect Google has eased up on this early technical constraint. For example, try a search for "shop ipad" - you'll see this Apple.com URL in the Top 10:

              store.apple.com/us/browse/home/shop_ipad/family/ipad/select

              Google seems to have no trouble bolding "shop_ipad" as two words.

              I still completely agree that, if you were starting fresh, I'd go with hyphens. A sitewide 301-redirect does carry some risk, though, so I think it boils down to this - are your pages ranking now for terms in the URL? If they seem to be ranking and it's just a matter of ranking better, I doubt the change would help much. If they seem to not be ranking at all and you suspect the URL terms are to blame, that's a different story.

              Even in a perfect world, keywords in the URL are just one, relatively small factor. I'd want to see the data, but my gut reaction is to leave it alone until you need to make a sitewide URL change for other reasons.

              AlanMosley 1 Reply Last reply Reply Quote 2
              • AlanMosley
                AlanMosley @AlanMosley last edited by

                Well it does, google has told us so.

                Its quite simple, as matt cutts said thety treat blue_widget as a single term and do not seperate it into 2 words. They do seperate blue-widgets and even bluewidgets.

                Unless you have some evidence that they have changed, then i will stick to what google has stated on the subject

                1 Reply Last reply Reply Quote 0
                • BenRush
                  BenRush @AlanMosley last edited by

                  No, I don't need to watch the videos I've seen and heard that stuff before. I'm just saying I don't buy the fact that blue-widgets vs. blue_widgets has any impact whatsoever on a sites ability to rank for "blue widgets".

                  Maybe a few years ago, but not today.

                  Hence I see no value in risking link equity to change from underscores to hyphens.

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

                    Hi Logan,I would like to tell you that the basic concept is to make the URL search engine friendly — and by friendly, we mean optimized to rank better.

                    The short answer is that you should use a hyphen for your SEO URLs. Google treats a hyphen as a word separator, but does _not _treat an underscore that way. Google treats and underscore as a word joiner — so red_sneakers is the same as redsneakers to Google. This has been confirmed directly by Google themselves, including the fact that using dashes over underscores will have a (minor) ranking benefit.

                    Again, SEO URLs should use hyphens to separate words. Do not use underscores, do not try to use spaces, and do not smash all the words together intoonebigword. As of 2011, dashes are still the best way to optimize your SEO URLs.

                    ccording to Matt Cutts - a senior software engineer at Google - he recommends using dashes for Google.

                    According to his article, "Dashes vs. underscores", if you have a URL like 'keyword1_keyword2' Google will only return that page if the user searches for 'keyword1_keyword2' (which almost never happens).

                    If you have a URL like 'keyword1-keyword2', that page can be returned for the searches for 'keyword1', 'keyword2', and even 'keyword1 keyword2'.

                    Don't forget to inform Googlebot and other search engine crawlers that a page has moved to a permanent location by adding 301 redirects to your web site's '.htaccess' file.

                    301 Redirect

                    For example:

                    Redirect 301 /old_directory http://www.example.com/new-directory

                    Redirect 301 /old_page.html http://www.example.com/new-page.html

                    Redirect 301 /old_directory/old_page.html http://www.example.com/new-directory/new-page.html

                    Note that the first URL only includes the directories (if any) and file name. The second URL must include the domain, in addition to the directory (if any) and file name. This is because the redirect may point to a file on another domain - it doesn't have to be on the same domain.

                    I hope that you will found the solution.

                    1 Reply Last reply Reply Quote 4
                    • RobertFisher
                      RobertFisher last edited by

                      Gosh guys way to heat up the seemingly boring 😉 I like it.

                      Everyone makes interesting points. Alan, as always knows the code back and forth. Ben makes a good point as well (moderation, nothing wrong with that in SEO). I would have to say that when it comes to 301 redirects, as an agency that does a few site redesigns, client purchases of sites, etc. we do a few redirects. We also have clients who end up with multiple sites for one reason or another and we convince them to "merge." Here is what I know of 301 redirects. The common belief is that you lose up to 10% of the juice with a 301. My experience has been that it is not even close. When 301's are done appropriately (url to url in .htaccess say for apache) we do not see more than a 1 to 2% loss. That is from experience and not theory.

                      That said, I like what Alan says regarding Matt Cutts...If it was his $$ on the line. Understand that Matt has to be Googles non committal answerer of things SEO. How many times do you here him say Google absolutely does this and you should absolutely do that?

                      Using the one keyword _ versus the two keyword - , for me it would come down to if my _ were ranking really well and making me money, there would have to be some component of that ranking that is based on the keyword. Therefore, in spite of what I know about a 301, I would not change it. If it is there and not making me $$ I am going to go with a best practice in my opinion of hyphen vs. Underscore and make the 301.

                      you guys are fun, hope I added something.

                      Best to all,

                      1 Reply Last reply Reply Quote 1
                      • donford
                        donford @AlanMosley last edited by

                        I think what maybe getting overlooked is the fact that Google will or can separate words in a url. I have no official proof of that except if you go to Google and type something like "Bike Shop" the words "bike" and "shop" will be bolded in domains that contain the characters bikeshop.

                        This if nothing else suggest that Google can at least bold 2 words they are being treated as 1 word.  Maybe Matt Cutts couldn't say this directly since it hints at something in Google's algorithm. Giving  non-descriptive advice like "if it is well indexed I'd leave it alone" is better then saying don't worry we are breaking domains apart alphabetically to ascertain words.

                        It almost seems trivial to worry about something like that when there are so many other things that can be done SEO'wise. I've been on both sides of the fence and have taken solace in the words of Matt Cutts if it is already well indexed leave it alone, if it is a new page or one that is preforming crappy then use / change to dashes.

                        1 Reply Last reply Reply Quote 0
                        • AlanMosley
                          AlanMosley @AlanMosley last edited by

                          did you watch the video?
                          We know that keywords in a url are a ranking factor
                           http://www.youtube.com/watch?v=gRzMhlFZz9I
                          We know thay underscores do not seperate keywords http://www.youtube.com/watch?v=Q3SFVfDIS5k , so if you want to rank for blue widgets rather then blue_widgets then using undersscores would have a negative impact on rankings.

                          1 Reply Last reply Reply Quote 0
                          • BenRush
                            BenRush @AlanMosley last edited by

                            Show me some examples where you think it impacts rankings....

                            **sorry didn't mean to sound arsey there 🙂 I just don't think one variation its necessarily better than the other when it comes to rankings. I really do think it purely boils down to preference of how it looks.

                            Ben

                            1 Reply Last reply Reply Quote 0
                            • AlanMosley
                              AlanMosley @BenRush last edited by

                              i have to correct you,

                              google sees this as one word some_keyword

                              but sees this as 2 words some-keyword

                              See link Donford posted

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

                              BenRush AlanMosley donford 5 Replies Last reply Reply Quote 1
                              • BenRush
                                BenRush last edited by

                                I was considering doing the same thing a couple of weeks back and decided the change wasn't worth it.

                                1. Hyphenated URLs do generally speaking just look nicer, but how likely is that to impact things like UX or CTR rates? (unlikely). It certainly doesn't impact rankings - just do some generic searches and you'll find a real mixed bag of hyphens and underscored URLs in the listings.

                                2. If your underscored URLs have been around for a long time then chances are you have some link equity built up into at least some of those URLs. 301 redirecting from underscored to hyphenated versions of the same content is an  unnecessary risk to some of that link equity.

                                If I had a relatively new site, low traffic from organic search and no real link equity then I probably would take the plunge and update from underscores to hyphens, but it would be an almost cosmetic move based on my own personal preferences. In your case I would advise against updating the URLs unless the domain has no pre-existing equity to give up.

                                Ben

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

                                  Donford is correct in that is what matt cutts said, but i bet you if matts cutts main souce of income came from his web site he would change them.

                                  You will lose a some link juice if you 301 redirect, i would look at the in-comming links, if the pages in question have little in links then i would change them. If you do, make sure you change all youyr internal links to point to the new format, dont allow internal links to go thought a redirect when you have controle of them.

                                  1 Reply Last reply Reply Quote 2
                                  • donford
                                    donford last edited by

                                    Hi Logan,

                                    I was faced with the similar question a couple years ago when I started with my current company.

                                    The short answer is no, do not change a url that is currently using underscores to hyphens if it is well indexed.

                                    If you're making a new page, then you should probably use hyphens instead of underscores.

                                    Matt Cutts (Google) Hypen vs Underscore

                                    Matt Cutts (Google) YouTube Video

                                    1 Reply Last reply Reply Quote 1
                                    • 1 / 1
                                    • First post
                                      Last post

                                    Got a burning SEO question?

                                    Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                                    Start my free trial


                                    Browse Questions

                                    Explore more categories

                                    • Moz Tools

                                      Chat with the community about the Moz tools.

                                    • SEO Tactics

                                      Discuss the SEO process with fellow marketers

                                    • Community

                                      Discuss industry events, jobs, and news!

                                    • Digital Marketing

                                      Chat about tactics outside of SEO

                                    • Research & Trends

                                      Dive into research and trends in the search industry.

                                    • Support

                                      Connect on product support and feature requests.

                                    • See all categories

                                    Related Questions

                                    • vtmoz

                                      On page vs Off page vs Technical SEO: Priority, easy to handle, easy to measure.

                                      Hi community, I am just trying to figure out which can be priority in on page, off page and technical SEO. Which one you prefer to go first? Which one is easy to handle? Which one is easy to measure? Your opinions and suggestions please. Expecting more realistic answers rather than usual check list. Thanks

                                      Algorithm Updates | | vtmoz
                                      0
                                    • vtmoz

                                      Google ranking impact: Returning visitor vs New visitor

                                      Hi all, If a website's traffic increase in "New visitors"; will this impact rankings? Do the website overall traffic affect rankings? How much this is related with ranking improvement for main keywords? Just because thousands of visits increased for website, will it count as a strong ranking improvement signal? Thanks

                                      Algorithm Updates | | vtmoz
                                      0
                                    • newspore

                                      Flat Structure URL vs Structured Sub-directory URL

                                      We are finally taking our classifieds site forward and moving into a much improved URL structure, however, there is some disagreement over whether to go with a Flat URL structure or a structured sub-directory. I've browsed all of the posts and Q&A's for this going back to 2011, and still don't feel like I have a real answer. Has anyone tested this yet, or is there any consensus over ranking? I am in a disagreement with another SEO manager about this for our proposed URL structure redesign who is for it because it is what our competitors are doing. Our classifieds are geographically based, and we group by state, county, and city. Most of our traffic comes from state and county based searches. We also would like to integrate categories into the URL for some of the major search terms we see. The disagreement arises around how to structure the site. I prefer the logical sub-directory style: [sitename]/[category]/[state]/[county]/
                                      mysite.com/for-sale/california/kern-county/
                                      or
                                      [sitename]/[category]/[county]-county-[stateabb]/
                                      mysite.com/for-sale/kern-county-ca/ I don't mind the second, except for when you look at it in the context of the whole site: Geo Landing Pages:
                                      mysite.com/california/
                                      mysite.com/los-angeles-ca-90210/ Actual Search Pages:
                                      mysite.com/for-sale/orange-ca/[filters] Detail Pages:
                                      mysite.com/widget-type/cool-product-name/productid I want to make sure this flat structure performs better before sacrificing my analytics sanity (and ordered logic). Any case studies, tests or real data around this would be most helpful, someone at Moz must've tackled this by now!

                                      Algorithm Updates | | newspore
                                      0
                                    • measurableROI

                                      Wistia vs. YouTube

                                      Hello, Mozzers!  Sorry if I've missed a thread on this, but I didn't find anything after searching for a while... I've used Wistia for years - LOVE the service and the company!  Had great luck getting Rich Snippets, ranked well...  until the recent Google change.  Now all of my Wistia thumbnails have disappeared (though my rankings have stayed strong, thank goodness!)  M question is, does it make sense to now embed YouTube videos on our site, and to create a video sitemap with those pages, with the hope that Google will rank the page better than it otherwise would have, knowing that there is valuable (video) content on the page?  This is new videos, I'm not thinking of replacing my Wistia videos at this time. I'll probably need to clarify as I see your responses, since this is a tricky set of interrelated decisions.  Thanks for any thoughts that anyone may have!  🙂 ~ Scott

                                      Algorithm Updates | | measurableROI
                                      1
                                    • KempRugeLawGroup

                                      Homepage Index vs Home vs Default?

                                      Should your home page be www.yoursite.com/index.htm or home.htm or default.htm on an apache server? Someone asked me this, and I have no idea. On our wordpress site, I have never even seen this come up, but according to my friend, every homepage HAS to be one of those three. So my question is which one is best for an apache server site AND does it actually have to be one of those three? Thanks, Ruben

                                      Algorithm Updates | | KempRugeLawGroup
                                      0
                                    • ydop

                                      Plural vs non-plural domain name

                                      I'm sure this question has been answered and asked a 1,000 different ways but what would be the best domain name to use in the long term (2 years +)? The plural versions (examples.com) which has a decent domain authority and is ranking 1st in Google search results yet has less search volume or the singular version (example.com) that has no current SEO value for the search term that we'd like to target however the singular version of the keyword has a much higher search volume? so basically will it be better to have the exact match that has more volume or the plural form that has better rankings after 2 years of doing SEO for each domain? My guess is that using (examples.com) with the better domain authority and tightening the grip on its dominance in Google will still be more effective than having the exact match domain with more search volume for that keyword while performing the same amount of SEO even after two years. Any suggestions?

                                      Algorithm Updates | | ydop
                                      0
                                    • RonSparks

                                      What's better .NET or a hyphenated.COM domain

                                      What's better .NET or a hyphenated .COM domain I know this is simple but in selecting a domain for my current project and I only have two options. firstname-lastname.COM or 
                                      firstnamelastname.NET I'm leaning to the .COM as after reading the how to choose a domain name post. http://www.seomoz.org/blog/how-to-choose-the-right-domain-name Thanks

                                      Algorithm Updates | | RonSparks
                                      1
                                    • richardstrange

                                      Is a slash just as good as buying a country specific domain? .com/de vs .de

                                      I guess this question comes in a few parts: 1. Would Google read a 2-letter country code that is after the domain name (after the slash) and recognize it as a location (targeting that country)? Or does is just read it as it would a word. eg. www.marketing.com/de for a microsite for the Germans www.marketing.com/fr for a microsite for the French Or would it read the de and fr as words (not locations) in the url. In which case, would it have worse SEO (as people would tend to search "marketing france" not "marketing fr")? 2. Which is better for SEO and rankings? Separate country specific domains: www.marketing.de and www.marketing.fr OR the use of subfolders in the url: www.marketing.com/de   and    www.marketing.com/fr

                                      Algorithm Updates | | richardstrange
                                      0

                                    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
                                    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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                                    • Accessibility
                                    • Terms of Use
                                    • Privacy

                                    Looks like your connection to Moz was lost, please wait while we try to reconnect.