Alex Rivera | Logout

What are the pros for using extension-less URLs?

Asked 2010-01-31T06:01:42.113
20

What are the pros for using extension-less URLs?

For example, why should I change...

http://yoursite.com/mypage.html
http://yoursite.com/mypage.php
http://yoursite.com/mypage.aspx

to...

http://yoursite.com/mypage

And is it possible to have extension-less URLs for every page?

Update:

Are extension-less URLs better for site security?

Edit
Report

3 Answers

29

The reason for extension-less URLs is that it is technology independent. If you want to change how your content is rendered you do not have to change the URL.

W3: Cool URIs don't change

File name extension

This is a very common one. "cgi", even ".html" is something which will change. You may not be using HTML for that page in 20 years time, but you might want today's links to it to still be valid. The canonical way of making links to the W3C site doesn't use the extension....

Conclusion

Keeping URIs so that they will still be around in 2, 20 or 200 or even 2000 years is clearly not as simple as it sounds. However, all over the Web, webmasters are making decisions which will make it really difficult for themselves in the future. Often, this is because they are using tools whose task is seen as to present the best site in the moment, and no one has evaluated what will happen to the links when things change. The message here is, however, that many, many things can change and your URIs can and should stay the same. They only can if you think about how you design them.

answered 2010-01-31T06:06:50.923
5

People claim it makes for better SEO, even if I am not personally convinced of that. Many clients request these extension-less URLs nowadays, so it's just as well that it can be easily achieved.

If you are running IIS 7, you can switch the AppPool to run on the Integrated Pipeline, thereby removing the need to have specific extensions mapped to the ASP.NET engine. Once that is done, you can instruct Sitecore to use extension-less urls in the web.config setting (assuming Sitecore 6):

<linkManager defaultProvider="sitecore">
  <providers>
    <clear />
    <add name="sitecore" type="Sitecore.Links.LinkProvider, Sitecore.Kernel" 
         addAspxExtension="false"    /* This one is set to true, per default */
         alwaysIncludeServerUrl="false" 
         encodeNames="true" 
         languageEmbedding="asNeeded" 
         languageLocation="filePath" 
         shortenUrls="true" 
         useDisplayName="false" />
  </providers>
</linkManager>

And you're set.

Be aware that early versions of Sitecore 6 had a few issues when running Integrated Pipeline. More information can be found here.

answered 2010-02-01T08:00:34.953
0

Because user does not need to know technology behind a page. Example: domain.com/Programs/Notepad

answered 2010-01-31T13:44:44.457

Your Answer