URLs

How to design decent, friendly, URLs. Both for search engines and humans.

  1. In this Tutorial, it is shown how to redirect all HTTP requests to a index.php file using htaccess or Apache configuration files.
  2. Subdomains may be more flexible than directories when deciding for a location for a new web application, the main reason is that you can more easily setup extra servers as needed.
  3. How to turn a relative URL into an absolute URL while also handling dot segments in the URL.
  4. Why I finally decided to allow dots in URLs on- and in Beamtic's projects.
  5. A simple guide to using the Canonical URL tag, and tips on avoiding duplicated content in the SERPs.
  6. Tutorial on Absolute and Relative Paths in Windows, UNIX and the Web.
  7. How to freely, and easily enable HTTPS for your website.
  8. How to create a Meta Tag Redirect, using the meta refresh tag.
  9. To perform a client-sided redirect with JavaScript we can use the window.location object. Learn more in this tutorial.
  10. Should we use www in front of our domains, or is non-www better? This article can hopefully help you decide.

URLs in Web Development

A collection of articles dealing with website URL structure and their effect on users and search engines.

As a general recommendation, it is a good idea to make sure your URLs are accessible to search engines. This can be something simple such as, instead of using underscores in place of spaces, you would use dashes, since search engines tend to handle dashes better than underscores. More advanced decisions you might make, would be to also repeat main keywords for a given page in the URL of the page, as well as in the file names of relevant images on the page.

If a page has images on it, it may be a good idea to repeat keywords in the image file name, where it makes sense to do so, as well as in the alt attributes. Do this in a readable way, which makes sense if or when your users reads the alt content.

Using relative URLs

Using relative URLs might make it easier to move a site, or to later change the protocol. If you start out using the HTTP protocol, and later decide to change to HTTPS, having used relative URLs might help avoid problems when moving your site.

You can enable HTTPS for free using lets encrypt.