Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Should I strip file extensions from my URLs?

Loading...

Sign in or sign up now!
14,366
Loading...
Alert icon
Sign in or sign up now!
Alert icon
There is no Interactive Transcript.

Uploaded by on Mar 6, 2009

On February 26, 2009, Google software engineer Matt Cutts collected questions on Google Moderator and answered many of them on video.

J. from London asked:

Does stripping file extensions from URLs
(site.com/folder/page.html versus site.com/folder/page) have demonstrable benefit in the SERPs?

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 4 dislikes

Link to this comment:

Share to:

Top Comments

  • and why you don't use them in your personal blog, Matt? none of your url's end with any extensions, whatsoever

  • Matt, just a short reason why you should not have an extension on a URL but a / at the end when going to a web pages (you are correct about PDF/EXE etc) is that it's a W3C recommendation as you can quickly change the underlying programming tools. i.e. changing from .NET to a php driven website would not need a mountain of re-directs.

    I would personally always end my urls with / rather than .aspx, .htm, .php

    regards

    Andy

see all

All Comments (9)

Sign In or Sign Up now to post a comment!
  • How about is you use Drupal? Should you then add the .html? Some dynamic sites do that, with other CMSs as well.

  • @andrewkillen0726 Sorry, I was unclear. I was thinking more about resources included within the page, not resources that appear as links. There, the file extensions are for the developers' benefit alone, so you may as well do what makes sense programatically. See the source of the WHATWG homepage for examples.

  • @mhixson1 Not sure I would go that far as to rely on mime types for CSS and images. and definitly not for PDF exe and the like. Personally I like to let people know what they are getting before they get it with they mouse over a link. When I see something ending with a / I expect it to be a web page and nothing else.

  • @andrewkillen0726 Agreed. This can also extend to the non-HTML-like file types, such as images, stylesheets, scripts, and others. Rather than attempt to hard-code a mime-type in the file name (and also in the HTML in the case of style and script tags), why not let your server do it in the headers like it's supposed to? That frees you to serve up different file types to different users. For instance, src="/images/logo" could serve a .gif to ancient browers and a .png to everyone else.

  • Snake oil

  • URLRewrite (I.e., IIS7) wouldn't affect Google understanding the file correct? I believe it's only the appearance of the URL in the URL Browser Line.

  • But, what about wordpress stuff, where you can select end the url with / or add some arbitrary extension like .htm or .php

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more