Added: 2 years ago
From: GoogleWebmasterHelp
Views: 14,307
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
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.

  • 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

  • @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.

  • @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 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.

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

  • 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