When building a URL structure, there are many factors to consider. Here are 11 ways to create the perfect URL.

Before you start, you want URLs that:

are easy to link to

search engines like

people can easily remember

tell people what your pages are all about

The URL structure is everything that comes after the domain name. Choosing a domain name is important, but that is an article in its own right. We won’t address it here. Choosing whether to use subdomains or folders for large sections of a website is another related debate that we’ll pass on for today.

The URL structure is about how your folders and files appear to the public and to the search engines.

Make your URLs clear

The URL should make it clear what a person can find on the page. This is a no-brainer, but still gets overlooked. Here are the reasons this is so important:

People are more likely to link to a URL that shows clearly what it is.

Readers are more likely to click on a URL that shows clearly what it is.

URLs that make clear what the page is about have keywords built in (great for SEO)

Try to avoid parameters at the end of the URL. They look messy and tell the user nothing. They make the URL longer and harder to cut-and-paste for sharing.

Try to mirror the page title and the main heading of the page in the URL. One creates expectations for the other. The more similar they are, the better, but they don’t have to be identical (especially if you have a long heading).

Make your URLs short

Overall, shorter URLs tend to do better in Google searches. And people who link to pages using the URL as the link text, will be more likely to link to your short URL. A short URL might also make it easier for people to type in the URL, although that’s probably a minor consideration these days.

Remove minor “stop words”

Words like “a”, “the”, “in” and “on” tend to gum up a URL. They make the URL longer and more challenging to read. They are not needed in most cases, so do away with them. Here’s a list of those “stop words“.

Use the stem of the word

When choosing the words in a file or folder name, the word stem is usually best. Even if “cleansed” is in the heading, “clean” is the best form for the URL.

Be cautious applying this tip. If you are tracking a specific search term, when most people search with “cleaning”, it might be worth using the most-searched variation of the word. Then, again, it might be worth changing your heading to match that form, too.

Don’t duplicate content

If you have two URLs serving up the same content or almost identical content, one should be removed. You can do this either by using a 301 redirect or by using the rel=canonical attribute to tell the search engines which URL to index and which to ignore.

Use only letters and numbers

All browsers on all systems with any setting can read these. The more exotic you get with other characters, the greater the risk that your URL will be messed up on some people’s devices.

If a file or folder in your URL has several words, best to separate them with a hyphen. It looks less messy than an underscore and has historically been easier for machines to read, too. Don’t leave a space, because that sometimes gets rendered as %20 and can mess up the URL when cut-and-pasted.

Be direct with redirects

If you have a big site that has been around for a long time and through many changes, you might have multiple redirects. Page A is no longer valid, so you redirect it to page B, which redirects to page C once it is no longer valid.

After a while, a redirect from page A to page G might follow six individual redirects. This can slow down the rendering. Given the importance of speed for both users and search engines, that is not a good thing.

Once you get past two redirects, best to make one jump. Redirect A directly to G.

Limit the number of folders

On a big site, with many thousands of pages, it’s hard to store all the files in just a couple levels of folders. However, the fewer folders, the better. Anything you can do to reduce a file level or two is worth the effort.

If you’ve read this far, you have more than enough work ahead of you to create the ideal URLs. Ow much of this really matters? All of it, to some degree. How much effort you put into URLs might depend on the size of your website.

Keep it simple.

Make it make sense to humans.

If you do these two things, you’ll find that most of the others fall into place.

This entry was posted on Saturday, July 1st, 2017 at 10:44 am and is filed under web design. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.