What Is A URL And Why Do They Matter For SEO?
Updated by Chima Mmeje — November 11, 2024.
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.
What is a URL?
A URL (Uniform Resource Locator) is essentially the web address you type into your browser’s address bar to visit a specific web page. Think of it as the digital address that directs you to a unique resource on the internet, whether it’s a web page, an image, or a video. URLs are crucial for web browsers and search engines as they help locate and retrieve these resources from the vast expanse of the internet. A URL typically consists of a protocol, domain name, and path, and may include additional components like parameters and anchors to provide more specific directions.
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 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).
While a URL is a type of Uniform Resource Identifier (URI) that specifies how to retrieve a resource, a URI can also simply identify a resource without providing retrieval information.
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.
Anatomy of a URL
A URL is composed of several key parts, each serving a specific function to guide you to the desired resource. Let’s break down these components:
- Protocol: This is the first part of the URL and it specifies the communication protocol used to access the resource. Common protocols include HTTP (Hypertext Transfer Protocol) and HTTPS (Hypertext Transfer Protocol Secure), which ensure the data is transferred securely.
- Domain Name: Following the protocol, the domain name identifies the web server that hosts the resource. It usually combines a top-level domain (TLD) like .com, .org, or .edu, with a second-level domain (SLD), which is the unique name chosen by the website owner.
- Path: The path specifies the exact location of the resource on the web server. It often includes a series of directories and subdirectories that lead to the specific file or page.
- Parameters: These are optional components that provide additional information to the web server, often used to filter or sort data. Parameters are typically found after a question mark (?) in the URL.
- Anchors: Also optional, anchors specify a particular section within a resource, allowing users to jump directly to that part of the web page. They are usually indicated by a hash symbol (#).
Understanding these components helps in crafting URLs that are both user-friendly and optimized for search engines.
Types of URLs
URLs come in various forms, each with its own specific characteristics and uses. Here are some common types:
- Absolute URLs: These are complete URLs that include all the necessary components to locate a resource. They are typically used to link to resources on different websites. For example, http://www.example.com/page.html.
- Relative URLs: Unlike absolute URLs, relative URLs do not include all the components. They are used to link to resources within the same website, making them shorter and easier to manage. For example, /page.html.
- Canonical URLs: These are preferred URLs for resources that have multiple URLs, helping to avoid duplicate content issues. They tell search engines which version of a URL to index. For example, http://www.example.com/page.html might be the canonical URL for http://example.com/page.html.
- Callback URLs: These URLs are used to redirect users to a specific page after completing an action, such as logging in or making a purchase. They are essential for web applications that require user interaction.
- Vanity URLs: Custom URLs created for marketing and branding purposes, vanity URLs are easy to remember and often used in promotional materials. For example, http://www.example.com/special-offer.
By understanding these different types of URLs, you can better manage your website’s structure and improve its SEO performance.
Why do web addresses 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):
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 in search engines
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 when copied and pasted as links in forums, blogs, social media networks, or other online venues.
The benefit here is twofold:
- 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.
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.
SEO best practices for human readable URLs
- 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. For instance, using clear and descriptive URL examples like http://www.example.com/category/product can help users and search engines understand the content of the page.
- 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.
Create 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:
Keep learning
- SEO Essentials Certification - A 6-part course and exam series aimed to get you up to speed on SEO quickly and effectively.
- Domains
- Redirection
- 15 SEO Best Practices for Structuring URLs
- Uniform Resource Locators (URL): This is the original description of URLs written by their inventor, Tim Berners-Lee.
- Understanding Web Servers: Learn about the role of web servers in managing and retrieving data online.
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.
Alt Text
Duplicate Content
What Is A Robots.txt File? Best Practices For Robot.txt Syntax
Robots Meta Directives
Page Speed
Conversion Rate Optimization
Core Web Vitals
Performance Metrics: Opportunities & Diagnostics
H1 Tags
The Ultimate Guide to Image SEO: Optimizing Your Visuals for Search
Show Less