Clean URLs for Good SEO

I need not delve into the technical details of percent-encoding to make my point regarding keeping your URLs clean as part of your on-site search optimization, but some basic coaching is in order. I see a couple repeat offenses that bother me and I would like to discuss them here briefly in hopes of raising some awareness of the situation.

TL;DR
- Use Dashes in URL’s NOT spaces or underscores
- Don’t use any special characters in your urls. Only letters, numbers, slashes, and dashes.

First major offense is the use of an apostrophe in URLs

Feel free to use them in the title and throughout the content of your page but do not use them in the URL structure. Search engines view an apostrophe in a URL as %27. So Google sees http://domain.com/don’t-do-this as http://don%27t-do-this. This causes issues with keyword separation and can very well cause issues in your search rankings. Some sites also have problems dealing with encoded characters as well. For example bit.ly and other URL shortening services have had issues properly linking to sites using apostrophes and other encoded characters in the URL.

If you use WordPress for your site and/or blog it ‘should’ automatically fix your URL for you after you type your post title as you can see in the image below. If it doesn’t click the edit button and fix it before publishing.
WordPress Cleans Apostrophes from URLs

Second major offense is the use of spaces in URLs

I don’t see spaces used in URLs as often as I see apostrophes but it is unfortunately still too common. Spaces cause a similar issue by displaying as %20 character. Hyphens are the preferred character for separating two words in URLs – do not use spaces or underscores. Don’t argue with me, there are many reasons for this, including the actual spec that explain it. This includes Matt Cutts from Google re-explaining the dashes-vs-underscores thing in this Google Webmaster Help Video.

Same goes for Filenames

While I’m at it, your filenames need to follow these same guidelines. You optimize your image and video filenames to include keywords (right? you should be!) and should be using hyphens to separate those keywords as you do in your URLs.

If you currently have these problems on your site – I don’t recommend editing your old URLs unless you’re prepared to create 301 redirects for all of them (301 underscores to hyphens). Do keep an eye on your new posts and be cognizant of the situation in the future and keep your URLs clean as part of your SEO strategy.

Comments

23 Responses to “Clean URLs for Good SEO”

  1. On 17th Aug 2010 at 10:27, Paul Sutton said:
    1

    Is there a way to further clean up the urls by removing the source filetypes (e.g. .htm, .php) with .htaccess? The current method I use requires listing all pages with the .php extension to be listed, which can get monotonous, not to mention, would require editing each time a new page was added.

  2. On 17th Aug 2010 at 11:36, Paul Sutton said:
    3

    That's what I was thinking of, thanks. Just seems a bit nicer to be able to direct someone to yourdomain.com/pricing rather than yourdomain.com/pricing.htm, not to mention avoiding the 301 redirect if the site ever gets built in another language.

  3. On 17th Aug 2010 at 12:09, Aaron Kavlie said:
    4

    It's surprising how many sites still completely drop the ball on this one — big corprorate sites that ought to know better. Witness this from HP: http://www.shopping.hp.com/webapp/shopping/comput

    Also, this (among other things) is a useful filter for the legitimacy of SEO operations — if they go on and on about keywords, directories, search engine submissions, etc. while not saying a word about your URL structure, they're not worth listening to.

  4. On 20th Aug 2010 at 08:23, Darren Smith said:
    6

    Fourth major offence – using apostrophes in plurals? (URL's) ;)

  5. On 23rd Aug 2010 at 04:38, James MacDonald said:
    7

    Same great tips laid out nicely and clearly. Many people don't take into account how they name files such as photo's etc. and include those dreaded underscores. One thing seems to be clear – think and plan before you just go ahead and do something with your website.

  6. On 23rd Aug 2010 at 10:23, ElizOF said:
    8

    Thank you Chuck! I learned some great tips from this post. As a blogger with limited insight to SEO and HTML, I frequently make the mistakes you mentioned and probably others I am unaware of. I appreciate your clear explanations. Any other thoughts would be appreciated.
    Best,
    Elizabeth

  7. On 23rd Aug 2010 at 10:40, thos003 said:
    11

    but doesn't HP's canonical cure this… From source code: <link rel="canonical" href="http://www.shopping.hp.com/webapp/series/category/desktops/200xt_series/3/computer_store"&gt;

  8. On 23rd Aug 2010 at 10:55, vegasgeek said:
    12

    Though it's not really a concern for SEO, it also bothers me when people use mixed-case when naming pages or files. Stick to all lower case file names and URLs!

  9. On 24th Aug 2010 at 04:02, Andy @ FirstFound said:
    15

    Excellent advice there, thanks. I'm sick of seeing URLs20%like20%this, when it could all be solved with a hyphen. Never mind the SEO potential, it means people don't remember your URLs, it looks ugly when people share links and it's just plain lazy.

  10. On 25th Aug 2010 at 05:31, Ric Dragon said:
    16

    If you’re going to chop the extensions off file names, you’ll want to end them with trailing slashes. Most servers will do this by default- but you’ll want to write your urls that way in links, too. Positive from seo perspective.

  11. On 27th Sep 2010 at 21:28, @paulredmond said:
    18

    The biggest issue in using the extension in a url design, is that you are exposing the server-side technology and application design to the end-user. You are also locking the url design to a specific language when it doesn't have to be.

  12. On 18th Oct 2010 at 10:37, marco said:
    19

    Excellent advice – this is pretty basic stuff in seo these days and is the least that people should be doing. You also need to make sure that you use good titles for your pages and that the URLS that show when you search have good keywords in them as the page title URL is very important to the search engine spiders.

    Choose your keyword first and then work your page title around your keywords – if you use wordpress sites you can change your url settings quite easily so that they appear in a format of words not numbers etc and you need to make sure that your site has been designed in a way that the pages display the URL as words and not numbers such as CAT6 etc

    Anyway pretty basic stuff

  13. On 3rd Nov 2010 at 18:24, Mike Taylor said:
    21

    Basic advice yes, but good solid advice too that I see a bunch of people still ignoring these days. I know I look back at some of the urls I created and just scratch my head wodnering what I was thinking when I came up with those.

  14. On 21st Apr 2011 at 13:48, EasyStreet said:
    22

    I could have used some of this advice many years ago. We recently updated our URL structure and it has made a huge difference in our indexed pages, PR, etc. We still are trying to clean up all the duplicate content indexed with different session ID's and URL parameters we had used in the past. And our programmer loved to use _ all over our site. Hopefully using GWTs and a lot of canonicals we can get it cleaned up. Thanks for the post Chuck.

  15. On 17th Nov 2011 at 15:10, Mike from Indianapolis said:
    23

    @vegasgeek I hear ya there? Mixing upper and lower case it annoying. It’s also, I heard, correlated with criminal tendencies. Of course, that could have more to do with lack of education than anything. When it comes to naming files, i like to stick with all lower case, and prefer hyphens to underscores. I can’t believe some people are using apostrophes in their URLs.


Unload your comment:

rynoweb powered by chuck, built on wordpress