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
-
URL Domain Used in Meta Description
Today I was asked if using a domain url in your meta description can have a negative impact on your website. This description includes a list of the homepage url, but directs visitors to a different internal page of the website. My concern fell with directing visitors to a different page of the site, but promoting the homepage in the description/snippet. With Penguin 2.1 release on the 4th, I'm very cautious of my links/urls. What are your thoughts behind this? What are the possible, if any negative impacts this could have on a site? This URL does have a brand name as so the Title.
On-Page Optimization | | flcity150 -
Errors in URL´s
SEOMOZ is showing quite a lot of URL Errors like this: http://trampoliny.net.pl/akcesoria/pokrowiec-basic?frontend=1825cb1eea3af8ee6ee2d96617d32ff6 All these URL´s use the parameter "?frontend=". In webmaster tools we told google not to index this parameter. Unfortunately at the moment we cannot set this parameter as "NOINDEX". We also dont want to use a robots.txt file. How to get rid of the URLS in Seomoz?
On-Page Optimization | | drgoodcat0 -
How do I cure 'overly dynamic' url's on an e-commerce website?
I've just launched an e-commerce website selling hosiery and have received aa report from SEO Moz regarding overly dynamic URL's. How do I resolve this issue - in words of one syllable please, I'm new to SEO! Here are three exapmles of over 120: http://www.yosassy.com/index.php?route=product/category&path=1&page=2 http://www.yosassy.com/index.php?route=product/product&filter_tag=&page=1&product_id=57 http://www.yosassy.com/index.php?route=product/product&filter_tag=&page=1&product_id=64 Thank you.
On-Page Optimization | | lindsayjhopkins0 -
Colons and commas in title tags instead of hyphens and pipes ?
Hi In light of Google changing display of title tag from character limit to pixel limit does it make sense to swap some uses of pipes and hyphens with colons and commas ? For example: Category: Keyword, Keyword, Keyword | Brand Instead of: Category - Keyword - Keyword - Keyword | Brand I seem to remember hearing bad things about colons in title tags but think that was just in regard to when used multiple times. Surely ok to use once if in logical format ? Cheers Dan
On-Page Optimization | | Dan-Lawrence0 -
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 -
Changing url in connection with meta title inconsistency
We run a site, which is a directory type one, where visitors can look for local businesses per city as well (at some point similar to the 'Yelp concept'). Now, we use www.example.com as the homepage, and the www.example.com/city1, where city1 is the capital of our country, is 301 redirected to the homepage, so this is your default setting. When you choose e.g city2, your url changes to www.example.com/city2, and the city value is stored in a cookie. Then, when you leave the session, and return to the site later on, you will see the homepage url, but with your previous choice of city (in case you let cookies be stored). My concern is, that the meta title always contains the chosen city name, so when you return to the website, and you previously used city2, you will now see the homepage url (which normally belongs to city1), but with the meta title of city2 or with any other previously chosen city. Does this mean a problem, and should I always use the correct url, which would be www.example.com/cityX, or this could not cause a problem for me? If it does, would you mind sharing me the exact problems as well? Thanks,
On-Page Optimization | | Dilbak0 -
Custom Landing Page URLs
I will begin creating custom landing pages optimized for long-tail keywords. Placing the keywords in the URL is obviously important -- Question: would it be detrimental to rankings to have extra characters extending past the keyword? I'm not able to use tracking code, but need to put an identifier in the URL (clp = custom landing page). For example, is "www.domain.com/silver-fish.html" going to perform meaningfully better than "www.domain.com/silver-fish-clp.html" for the kw phrase "silver fish"? There will obviously be a lot of on-page optimization in addition to just structuring the URLs. Thank you. SIMbiz
On-Page Optimization | | SIMbiz0 -
Does having a "+" in a URL hurt SEO? Would much value be gained changing it to a hyphen?
There's a site that contains "+" signs in the URL in order to call different information for the content on the page. Would it be better to change those to hyphens (-), or not that much value will be gained, so leave them as is? Thanks!
On-Page Optimization | | MitchellStoker0