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
-
Should I be using the town or city in url with my keyword or keyphrase?
should I be using the town or city in url with my keyword or keyphrase? So lets say I'm trying to rank for butchers in home town should i put the town in the url as well so www.website.com/butchers-in-mytown is that bad? Or would it be best to just put www.website.com/butchers?
On-Page Optimization | | genkee0 -
Language for URLs on new international websites
We are due to launch our new site and it will be targeting an international market. We have setup these new sites in the following way www.website.com/fr/content-goes-here www.website.com/es/content-goes-here This has been done in conjunction with setting up the parameters in GWT and making sure it is optimised for the language itself, and that countries search engine. But our web dev team have said that the URLs at the moment will be in english and not the native language, so if you were on the french version of our site you would see the url in english and not french. Will this negatively affect the site for SEO, and who else would think it would be negative from a usability perspective? Any help is appreciated.
On-Page Optimization | | RyanCrawf19840 -
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 -
Wordpress category url problem.
I have set up wordpress categories but the permalinks are showing as www.mydomain.com/?cat=12 as opposed to the category name. The child categories though work fine and show as www.mydomain.com/category/chidcatgegory I've obviously got my permalink settings wrong somewhere. How do I fix this?
On-Page Optimization | | SamCUK0 -
Index.php + external site added to end of URL
Good day, I have a domain http://www.ecofriendlylink.com. I am trying to resolve the Crawl Diagnostic errors on it. I have several Duplicate Page Content errors. Example 1: (The domain happynewyou is not mine, some Comments from them have been placed on my site. Ecoshop.php is a page on my site). URL: http://www.ecofriendlylink.com Duplicate Page Content: http://www.ecofriendlylink.com/www./happynewyou.com/ecoshop.php Referrer: None. Example 2: URL: http://ecofriendlylink.com/index.php Duplicate Page Content: http://www.ecofriendlylink.com/index.php http://www.ecofriendlylink.com/www./happynewyou.com/index.php Referrer: http://ecofriendlylink.com/ Example 3: is a different problem, but still a Dup Page Error. URL: http://ecofriendlylink.com/water.php Duplicate Page Content: http://www.ecofriendlylink.com/water.php Referrer: http://ecofriendlylink.com/ water.php is a page on my main domain. The www version and the non-www version, if this a problem and something I need to overcome? So please can you advise what I need to do to get rid of this strange external domain name + index.php (as per examples 1 + 2), and explain what I'm doing wrong with Ex 3. Thank you!
On-Page Optimization | | drkevinhogan0 -
Rewrite URL for big website
My website is currently have over 1000 000 links indexed by Google , i'm going to rewrite all of these links, is this crazy ? Can someone give me a checklist to avoid going wrong way ? My website: http://www.webtretho.com/forum/ My current url format: webtretho.com/forum/f[forum_id]/[thread-title-thread_id/ Ex: Old URL: http://www.webtretho.com/forum/f90/chia-se-dau-hieu-mang-thai-1357342-new/ New URL: http://www.webtretho.com/forum/chuan-bi-mang-thai/chia-se-dau-hieu-mang-thai-1357342-new/
On-Page Optimization | | firstjames0 -
Image URL's have knocked my sub-pages down (WP)
I had most of my keywords within the top 10 for this site, some were even ranking in the top 5. For a possible minor boost, more-so to cover all the bases, I decided to add images to all of the pages, and they were uploaded as a gallery with most of the image file names being the same as the keyword. Thus, url's were created with our targeted phrases, extending off of the corresponding sub-page. After that, Google quickly picked up the url's to the images and began indexing them, when that occurred the sub-page which was to be the landing page, quickly tanked. Nothing else on-site changed besides the uploading of the images, so I'm sure they're conflicting and for whatever reason Google can't decide which page to index. The page that contains the images used, or the actual intended landing page. With WP I didn't see a way to not have them link to anything at all, and just be static when using a gallery, stock at least. So, my question is how can I quickly alleviate this problem and what should I do in the future to avoid this? I believe if I change link thumbnails to image file instead of attachment page, that should fix the issue... Then, I'll have dead URL's which I suppose I should 301 to the sub-page. Alternatively, is there a better solution that will work, I was also thinking about no-indexing the attachment URL's, but that doesn't seem to be an option.
On-Page Optimization | | JayAdams320 -
How should I structure my product URLs?
How should I structure my product URLs for the best SEO results? Lets say my product is "American Apparel 2001". Would it be better to run the URL together or use a "-" between each word. Here are two ideas I had, but feel free to suggest others. realthread.com/products/americanapparel2001 or realthread.com/products/american-apparel-2001 Thanks for the help! Dru
On-Page Optimization | | drudalton0