URLs are unique addresses for pages on the indexed, public internet! Each page you visit on the internet has a URL, and when you’re building a website (or rebuilding one) someone has to decide what that URL will be. There are a few best practices when it comes to URL naming, so let’s go over the basics!
Short and Human-Readable
When constructing URLs, avoid vague or unreadable strings. This will help users understand what to expect when visiting your page! This is especially important when it comes to search engines. Users won’t click on a result that doesn’t give them enough information as to what the page is about, and the URL is an important part of this, along with page titles and descriptions.
Hyphens, not Underscores
URLs will often include multiple words, either in the main domain (example.com/about-us) or in the file name (example.com/about-us). In these instances, be sure to separate words with hyphens, not underscores or slashes. Google has recommended this directly, as it’s easier for both humans and the bots that crawl the internet to understand hyphens as word separators.
If your goal is to ensure that people around the internet can find your pages by searching for keywords in a search engine, include keywords in the URLs of relevant pages.
Of course, it doesn’t make sense to include every keyword on every page. example.com/shoes-and-dresses-and-coats should be three separate pages: example.com/shoes, example.com/dresses, and example.com/coats. This will make much more sense to your users and the robots that search engines use to understand your pages!
Bonus! The Trailing Backslash
Pop quiz: what’s the difference between example.com/ and example.com? The backslash after .com technically makes them two different URLs.
Many times, site owners will redirect one version to the other and users won’t notice. If you find that both versions of your pages are available, choose one version that will be your default, and use a 301 redirect on your non-default versions to send users to the right version.
Your URLs are how users will navigate your website, but also how the bots that crawl the web will understand it! Be sure to follow these best practices to ensure search engines have a leg up on understanding what each page is about before they even get there.