Removing Excess Information from URLs Prior to Publishing

Before posting links online or in printed materials, do you clean them up? They may contain things that can be removed while still having functional links. They will be shorter. Plus, removing some parts may help future-proof the URL. Now I'm not talking about removing the "http://" and "www" portion. There are other things to consider.

Default Page

Graphical representation of the default page name being erasedWebsites commonly utilize a default page for directories. For example, when someone visits "www.somewebsite.com/about/", it automatically shows a page like "www.somewebsite.com/about/index.php", where "index.php" is the default page name. So links with "index.php", "index.html", etc. don't need the default page name. Note that some websites use something other than "index" as the default page, such as "default.php".

In addition to having fewer characters in the link, we also help prevent the link from breaking. For example, if the link leads to a page developed in ASP.NET (index.aspx), we don't need to worry if they switch to PHP (index.php).

Just be mindful that some links won't after removing the "index.php" portion, for example. Some websites do not redirect traffic to the default page name. Always test the link to be sure it works.

Redirected URL

On occasion, websites may have a domain name that isn't fully utilized. Instead, it may redirect visitors to another (possibly more complicated) website address. For example, an organization may have purchased a domain name for "www.fluffykittens.com". Instead of paying the extra hosting costs to fully connect the domain to their website, it's just redirect to something like "fluffykittens.wordpress.com". Unless there's some indication the address will stop working, it's better to stick with the shorter link. After all, fluffykittens.com may switch Blogger.

GET Variables

Another thing to look for is unnecessary GET variables. For example, when linking to a search query through Google, extra variables tend to be included in the URL which aren't necessary. Only the "q" variable is needed (ex: https://www.google.com/#q=PHP+manual).

Conclusion

Whether you're trying to reduce the length of a link or looking to help future proof them, there are options. Just make sure the links still work. As mentioned earlier, it's easy to assume that removing the "index.html" portion will always be okay. However, that's not always the case.

0 Comments

There are currently no comments.

Leave a Comment