URLs

A URL (Uniform Resource Locator), more commonly known as a "web address," specifies the location of a resource (such as a web page) on the internet. The URL also specifies how to retrieve that resource, also known as the "protocol," such as HTTP, HTTPS, FTP, etc.

Code sample

http://www.exampledomain.com

Imposed limits

To correctly render in all browsers, URLs must be shorter than 2,083 characters.

Optimal format

http://www.example.com/category-keyword/subcategory-keyword/primary-keyword.html

What is a URL?

A URL is human-readable text that was designed to replace the numbers (IP addresses) that computers use to communicate with servers. They also identify the file structure on the given website. A URL consists of a protocol, domain name, and path (which includes the specific subfolder structure where a page is located) and has the following basic format:

 protocol://domain-name.top-level-domain/path

The protocol indicates how a browser should retrieve information about a resource. The web standard is http:// or https:// (the "s" stands for "secure"), but it may also include things like mailto: (to open your default mail client) or ftp: (to handle file transfers).

The domain name (or hostname) is the human-readable name of the specific location where a resource (in most cases, a website) is located.

Think of the top-level domain (TLD) as something of a category for websites. While you're likely familiar with .com, there is also .edu for educational sites, .gov for governmental sites, and many, many more.

URLs also contain things like the specific folders and/or subfolders that are on a given website, any parameters (like click tracking or session IDs) that might be stored in the URL, and anchors that allow visitors to jump to a specific point in the resource.

Why do URLs matter for SEO?

There are 3 main benefits of URLs:

1. Improved user experience

A well-crafted URL provides both humans and search engines an easy-to-understand indication of what the destination page will be about. For example, the DPReview URL below is what we call a "semantically accurate" URL (it accurately describes its destination):

URLs-1.png?mtime=20170315125810#asset:4165:url

Even if the title tag of this page were hidden, the human-readable, semantically accurate URL would still provide a clear idea of what the destination page is about, and would provide visitors with an improved user experience by making it clear what they'll see if they click the link. (Worth noting: Google has increasingly been replacing the URL within the search result snippet area with a site name and breadcrumb path. This most commonly appears on mobile searches.)

2. Rankings

URLs are a minor ranking factor search engines use when determining a particular page or resource's relevance to a search query. While they do give weight to the authority of the overall domain itself, keyword use in a URL can also act as a ranking factor.

While using a URL that includes keywords can improve your site's search visibility, URLs themselves generally do not have a major impact on a page’s ability to rank. So, while it’s worth thinking about, don’t create otherwise unuseful URLs simply to include a keyword in them.

3. Links

In a pinch, well-written URLs can serve as their own anchor text when copied and pasted as links in forums, blogs, social media networks, or other online venues.

The benefit here is twofold:

  1. Some websites (like Facebook, for example), may leave shared links completely unformatted. Unoptimized, semantically inaccurate URLs can look unwieldy, and instead of garnering clicks they actually deter them. Human-readable URLs provide users a better idea of what they'll be getting when they click the link.

    URLs-2_170315_124322.png?mtime=20170315125811#asset:4171:url

In the DPReview example above, search engines might see the URL http://www.dpreview.com/review... and associate the page with the terms in the URL (dpreview, reviews, canon, eos, and 6d). Using keywords in your URL may increase the likelihood of your site ranking for the terms you choose, too.

If you're interested in running a high-level anchor text analysis of your site, check out our link building research tool, Link Explorer.

SEO best practices for URLs

Anatomy of a URL Cheat Sheet
  • Keeping URLs as simple, relevant, compelling, and accurate as possible is key to getting both your users and search engines to understand them (a prerequisite to ranking well). Although URLs can include ID numbers and codes, the best practice is to use words that people can comprehend.

  • URLs should be definitive but concise. By seeing only the URL, a user (and search engine!) should have a good idea of what to expect on the page.

  • When necessary for readability, use hyphens to separate words. URLs should not use underscores, spaces, or any other characters to separate words.

  • Use lowercase letters. In some cases, uppercase letters can cause issues with duplicate pages. For  example, moz.com/Blog and moz.com/blog might be seen as two distinct URLs, which might create issues with duplicate content.

  • Avoid the use of URL parameters, if possible, as they can create issues with tracking and duplicate content. If parameters need to be used (UTM codes, e.g.), use them sparingly.


Build better links with Moz Pro

With over 40 trillion links in our database, we've got SEO data on lock. Improve your research and build links strategically with a free 30-day trial of Moz Pro:

Start my free trial


Keep learning


Put your skills to work

Gauge a Site's Influence with Link Explorer

Link Explorer is a link popularity and backlink analysis tool that lets you research and compare any site on the web.