Mixing hyphens and underscores in a url
-
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!
-
Thank you!
-
Thank you, Ian!
-
Any recommendations?
If this was my site I would not worry about it.
-
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.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
Worth Dropping www. from Domain Name to Shorten URL
The Moz page grader identified several pages where the only problem is the length of the URL, above 75 characters. The site uses uses the www. prefix, and has for years, since 2001. Is it worth dropping the www. and doing a redirect to https://domainname.com to gain the 4 characters
On-Page Optimization | | FatRodent20130 -
Url permalink structure question!
Hello! I just read the "15 SEO Best Practices for Structuring URLs" but I have still a question: My A version bellow "20 accessoires" has no meaning in french. If I add "voyage" (version B), then is it considered as spammy? I mean the "voyage" keyword repetition? A) http://www.lytchee.com/preparer-son-voyage/20-accessoires/ B) http://www.lytchee.com/preparer-son-voyage/20-accessoires-voyage Thanks for advices! Sylvain
On-Page Optimization | | lytcheetv0 -
Duplicate URL's in Sitemap? Is that a problem?
I submitted a sitemap to on Search Console - but noticed that there are duplicate URLs, is that a problem for Google?
On-Page Optimization | | Luciana_BAH0 -
Duplicate home page URL on crawl test
Hi i just recently made a crawl test but before doing that i made sure that i have no more duplicates on my site i am using joomla and as of now i only have 11 links on my site but when my crawl test is done i saw duplicate url of my homepage the duplicate url has a trailing backslash so basically i have all the 11 links + 1 duplicate URL http://mangthomas.com http://mangthomas.com/ can you guys give advise how i can remove the duplicate i dont even know which one to retain. THANKS A LOT, cris
On-Page Optimization | | crisbasma0 -
URL for a new website
Hi, I am creating a new website for a client. Is it best to include the keywords from the most common search in the domain name, they would like: forenamesurname.com but should I be recommending: weddingmakeupbyforename.com Does it make much difference to search rankings if the keyword is in the domain name? Thanks v much
On-Page Optimization | | danieldunn100 -
Correct .htaccess settings for canonical url?
I want to forward all urls to http:www.mysite.com but am a little confuse because I am getting duplicate content error: Pages with Duplicate Page Content as of Jan 15http://titanappliancerepair.com/ 1 duplicatehttp://titanappliancerepair.com 1 duplicatehttp://titanappliancerepair.com/index.html 1 duplicate*****************************************************************What should I put ion htaccess file so I can forwardhttp://titanappliancerepair.com/index.htmlhttp://titanappliancerepair.comhttp://titanappliancerepair.com/to http://www.titanappliancerepair.comor what is the correct way to do it?I'm confused because when I enter http://titanappliancerepair.com/ in browser it showshttp://titanappliancerepair.com so how can it be considered duplicate content?.Can someone help?I have godaddy and they have gave me this code to put RewriteEngine on
On-Page Optimization | | webbutler13
rewritecond %{http_host} ^coolexample.com [nc]
rewriterule ^(.)$ http://www.coolexample.com/$1 [r=301,nc]What is correct?0 -
No Data Available for this URL
Hi,
On-Page Optimization | | ostiguyj
I really don't understand why I have this message "No data available for this URL"
in my SEOMOZ campain. (www.bienchezsoi.ca) When I look at my page rank, I get a score of 0 I have no idea of to fix it. Please help. Thanks0 -
Include the company/domain name in page titles and urls?
I know this isn't something that I would use site-wide but I'm wondering if it helps or hurts me to use my company name (also my domain name) in pages below the homepage. As an example, let's say I'm Home Depot. In the category pages off the homepage should I use Page names and urls like Home and Garden Supplies or Home and Garden Supplies at Home Depot? Or does it hurt me to reuse my company/domain name on multiple pages?
On-Page Optimization | | kdieruf0