15

I'm working for a website to convert the website URL to an SEO friendly URL. I plan to use this:

example.com/category-name/pageid-123-page-name

I looked at some similarly categorized, highly ranked websites. They have the same structure, except for one thing. In one case, the URL format was

example.com/category-name/pageid-123-page-name.html

Another was

example.com/category-name/pageid-123-page-name.php

Now I know the text in URLs help with SEO. Is it more helpful to have a file extension? If yes, which one is better?

Or if my current plan is okay, will it be better with a / at the end?

2
  • 4
    Why should Google rank a .php page higher than .html? Or URLs with slashes higher than URLs without? If it doesn't make a difference to your users, then it won't make a difference to search engines. If Google ranked pages using arbitrary metrics like those, then their search results would be useless. Putting .html pages before .php pages doesn't do web users any bit of good. Commented Nov 30, 2010 at 7:03
  • 1
    URIs shall be short, so it's best to leave out the extension altogether.
    – DanMan
    Commented Feb 23, 2013 at 19:33

3 Answers 3

7

URL, they matter a lot less in comparison to what the content it contains.

No matter how much detailed you make your URL, if the content you put inside like <title>, <h1>, <h2>, etc. is meaning less, your page will not rank higher.

3
  • Well, I know that. URl and h1 title is going to be same, But here I have 3 choice. High ranked websites uses extension. Now my question is which one will be better choice?
    – Aajahid
    Commented Nov 30, 2010 at 8:34
  • 2
    @Shakti, I did answer your question in the first sentence URL, they matter a lot less, you can go with any choice
    – Starx
    Commented Nov 30, 2010 at 8:42
  • 4
    Technically, the URL matters. It's just that pointless "optimizations" like the ones in question don't matter. It matters if you have a clean and descriptive URL. It doesn't matter whether or not you put an extension at the end of a URL. It'd be stupid if that made any sort of a difference. And it's a waste of time searching for these micro-optimizations that add no value for users. Why not focus on the optimizations that actually improve your site and are good for both users and search engines? Commented Nov 30, 2010 at 9:29
5

Including or not the extension is not the most important point for SEO. Content, clean and semantic markup, meta description, title.... these things weight more.

However, if you are intending to optimize your URLs (what isn't a bad thing at all), think on users first (as for everything).

Your plan is:

mysite.com/category-name/pageid-123-page-name

I suggest something even more friendly, like:

mysite.com/category-name/page-name

Unless you are using a industry made solution, coding a routine in php to handle those request should not be a huge challenge.

Ah, and don't get worried about every single minor difference between you and other sites. If you think the way you do is better for your users, go ahead in your own way. You probably is making better and getting ahead of them.

3
  • 4
    This. If you need to add a page ID, do it at the end of the url. The more important the keywords to you are, the earlier in the URI they should be. Commented Nov 30, 2010 at 18:16
  • will there be any difference in urls like (1) mysite.com/category-name/title-name/ and (2) mysite.com/title/title-name? in the first the category-name is dynamic where as in the second the word title is static ... while generating sitemap with category name it will he hierarchy were as if it is just title keyword it will not be hierarchy... which one is good for seo and for users it will be if there is the dynamic category name... suggestions please... Commented Dec 17, 2012 at 13:43
  • if using the second way then it is better to remove the keyword title which can remove a url segment.. isn't it? Commented Dec 17, 2012 at 13:49
5

The difference in ranking caused by file extensions and slashes in URL's is minimal. Choose whatever is easiest for you to work with (for example if you have to wrestle with a CMS)

The reasons the competition ranks higher than you do will be content and the number/quality of links pointing to those sites.

Not the answer you're looking for? Browse other questions tagged or ask your own question.