You ended up on this blog post by clicking on a link that leads to a URL. But what is a URL and how exactly does it work?
A URL is essentially a unique address that will lead to a specific page on a site when entered into a web browser. It’s what makes it easy to share webpages (or YouTube videos) you find interesting with your friends.
With millions of connected servers on the internet, hundreds of millions of websites, and billions of pages, it’s one of the primary technologies that make the web easy to navigate.
Without it, you would have no way to separate one page from the 64 billion other webpages on the internet.
In this post, we’ll do a deep dive into the URL, explain what it is in-depth, break down the individual building blocks of how it works, cover what a good URL looks like for SEO purposes, and more.
Check Out Our Video Guide to URLs
What Is a URL (Uniform Resource Locator)
A URL, or uniform resource locator, is an address that helps your web browser locate a specific webpage, picture, file, or other resource.
Your browser takes the address, translates the domain name to the IP address of the server, and the rest of the URL shows the path to the specific file on that server.
A URL leads to a specific file or page, while a domain name is the general “address” to the whole website or server.
URL vs. URI
A URI (or a Uniform Resource Identifier) is different from a URL in that it refers to the unique ID of a file or resource, but not necessarily the means through which you can access it.
It’s a higher level category of identifiers that also includes URL as one of its subcategories.
According to the official RFC 3986 specifications:
“A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource.”
It can be a unique name ID, the “location” (or network access point) of the resource, or both (which is what’s referred to as a URL).
https://kinsta.com/blog/what-is-a-urlis a URL, as it specifies the HTTPS protocol and full location of the page.
mailto:[email protected]is also a URL due to the mailto protocol but used for sending emails, not accessing a webpage or other resource.
urn:isbn:12312341234is a URN (Uniform Resource Name) which only specifies a name with no way to access the resource.
All of these formats fall under the larger URI umbrella, which covers both URLs and URNs.
To distinguish between actual links to online resources and the IDs of physical products, web links are typically referred to as URLs rather than URIs.
Note: The official guide itself indicates that you should “use URI rather than URLs” to describe web addresses, but it hasn’t been updated since 2005 so it’s a little bit behind the times. In 2020, URL is by far the most common term used to refer to web addresses.
What is an Example of a URL?
To look at an example of a URL, all you need to do is look at the web address field at the top of your browser, right underneath your tabs.
The field shows the URL for this page:
https://kinsta.com/blog/what-is-a-url. (Your browser might hide the HTTPS until you double-click the field.)
Notice that when you click on a different tab, it shows a different URL that refers to the page or file you are viewing.
The Anatomy of a URL (6 Different Moving Parts)
When you’re just visiting a web page, a URL may seem like the simplest thing in the world.
But a lot can happen in a single URL.
- A URL can send you to a specific webpage.
- It can also send you to a particular location on that page.
- It can communicate with your CMS (Content Management System) to display a distinct piece of content.
- It can even track where your visit originated using parameters to interact with your analytics software.
Let’s examine the different moving parts of a URL that make all of these things happen.
The HTTPS/HTTP Protocol
The first part of a URL identifies which protocol the server and webpage use to transfer data to your computer.
Depending on your browser, you may have to double-click the left side of the URL to see this part.
HTTP stands for Hypertext Transfer Protocol and is the basic, unencrypted way of transferring data over the internet. HTTPS stands for Hypertext Transfer Protocol Secure and is a more secure, encrypted protocol for transferring data. Google Chrome will show that a site uses HTTPS with a lock symbol, symbolizing a secure website.
If a site uses HTTP, it shows an attention mark that you can expand that warns you against submitting any sensitive information to the site.
Depending on the browser, website, and operating system, it may also automatically open a prompt that warns visitors.
Just imagine the negative impression this will give potential customers. It’s not a good look.
Not only that, but using HTTP can negatively affect your website’s rankings for Google keywords. Google has officially confirmed that they use it to decide where your page should rank in the search results.
But even with all the downsides of sticking with HTTP, in October 2020, 33.2% of websites were still not using HTTPS.
If you’re still using HTTP for your WordPress site, we’ve got a detailed guide for migrating your site from HTTP to HTTPs.
Depending on your current web host, it may be as easy as clicking a button or not possible at all. In some cases, it might be easier to switch to a more reliable host that uses HTTPS for all sites, like Kinsta.
The Domain Name & DNS
The domain name is what helps the browser find your web server in the first place, using the DNS (Domain Name System).
Put simply, DNS helps a browser translate a domain name into the actual IP address of the web server connected with it.
Without the DNS, we would have to surf the web by sharing chains of numbers like 241.102.129.209.
Not exactly easy to remember, am I right? Domain names aren’t just great for branding. They make it easier to share great content and ideas.
Instead of a random string of numbers, you can share or look up a domain name that makes sense. Like Kinsta.com, where anyone can easily find us after hearing about our company.
Read our guide to learn more about what DNS is and how exactly it connects domain names to web servers.
The path is any part of the URL that comes after the domain name, before a question mark or # that adds extra information to a URL (more on this below).
At first, the URL directly represented the file and folder structure of your server. So if you had to reach that file, you could follow that exact path with your FTP client to delete or edit it. For example, if the path is yoursite.com/folder1/folder2/file1.html, the structure would be the same on your server. If you used FTP or a file manager to look at it, it would look identical.
But these days, most websites are built with a CMS that uses a database to generate pages dynamically.
CMS’s rely on the server architecture to connect a normal-looking URL (like kinsta.com/blog/what-is-a-url) to a query string that will generate the right page.
That’s how WordPress permalinks work, and why
https://kinsta.com/blog/what-is-a-url leads to this page, even though we have no folder called blog or file named what-is-a-url on our server.
If this sounds complicated, and you don’t quite get it yet, don’t worry. We’ve got an entire section below dedicated to WP permalinks, how they work, and how you can change them.
Query Strings and Variables
The query string is the part that follows the question mark, and it can include variables that communicate with the PHP on that page to impact the visitor’s experience.
For example, for WordPress, the “p” variable is short for post and indicates which post WordPress is going to show on that page.
Without permalinks to make the URL more appealing, a WordPress post would only be accessible through URLs like this:
http://yoursite.com/?p=1294. You would need to specify the post ID to WordPress directly to get the page you wanted.
YouTube is one of the largest sites that still openly use variables in the permanent URLs of their content. Whenever you share a link to a video, it’ll lead to a URL like
URLs like this are no longer a huge concern for social sharing as most social media sites now include previews and meta titles for shared links.
But that type of URL can negatively impact the SEO of your website or blog.
UTM parameters are different from query strings that provide a variable for your site’s CMS or web app. Instead of directly affecting the visitor’s experience, they communicate with your analytics software. (For example, Google Analytics.)
These UTM tags track where visitors came from to analyze campaign performance. You can use them to indicate which platform, campaign, and even specific ad sent a visitor.
Some advertising platforms automatically generate parameters to store data about visitors.
The anchor is anything that comes behind a hash sign. It’s a page-specific link that leads to a specific part of a page.
The URL above will take you to the “The Anatomy of a URL” part of this page because it’s an anchor link or “jump link” to the ID of that specific subheading.
To use anchor links, you need to add an “ID” to the HTML tag that you want to link to. In this case, the actual code for the headline of this H2 section looks like this in plain HTML:
<h2 id=”the-anatomy-of-a-url”>The Anatomy of a URL </h2>
You can also add one manually to headers in the Gutenberg editor in WordPress by expanding the “advanced” section of a heading block.
At Kinsta, we don’t bother manually adding IDs to all subheaders. Instead, we use a plugin that generates a table of contents and jump links automatically for every article.
The plugin creates a span around relevant headings with the ID, saving us the trouble of manually adding it.
To learn more about how you can set this up on your WordPress site, read our guide on anchor links.
WWW or non-WWW
Including a www in your URL used to be a standard for all websites on the internet.
That’s not the case anymore. You may even have noticed that our website, Kinsta.com, doesn’t include www in the URL.
The three Ws are an optional part of a URL that identifies a site as a part of the World Wide Web. Whether you use it is mostly down to personal preference.
You can set up redirects to the correct form even if visitors don’t include it. So by default, Google Chrome and many other browsers don’t even show it anymore. The redirects render it irrelevant to the user experience.
And Google automatically uses the right variation in the search results, so it’s not an SEO factor.
Like with the protocol, you may need to double-click the URL to see the full URL that includes the www.
There can be some pros and cons to each option, depending on your company size and goals. Read more about choosing between a www domain and a non-www domain to make your decision.
If you want to add or drop the www, we’ve already covered how to change your URL to include or remove www in WordPress.
We briefly touched on this already, but with a CMS like WordPress, the URL path doesn’t represent the “real” path through existing folders and files on your server.
Instead, WordPress uses PHP and MySQL to generate pages based on query strings included in the URL, like
https://kinsta.com/?p=1294. That’s what the original WordPress permalink was.
“Prettier permalinks” like the one for this post, https://kinsta.com/blog/what-is-a-url, rely on an Apache or Nginx rewrite function to tie a URL to a relevant WordPress permalink with the post ID.
Thankfully, you don’t need to understand your server ecosystem or how to do this manually to make any changes to your URL.
You can handle it all from within WordPress (as long as your server environment is set up correctly).
If you set it to plain, your posts will only be accessible if you use links with the post ID variable:
Most WordPress sites avoid this for SEO reasons. A random number string can’t include a matching keyword, and is less clickable than a link that makes sense.
Instead, most sites use a structure that includes a blog title, or a variant of it, in the URL.
Editing Permalinks When Creating New Posts and Pages
WordPress’s autogenerated slugs and permalinks aren’t always ideal
If we let WordPress handle it, the permalink for this post would be something like kinsta.com/blog/what-is-url-explained-learn-how-to-get-most-out-your-sites-url.
It’s simply too long, and not ideal for sharing or SEO either.
So for SEO and sharing purposes, you can set a custom slug and permalink for each post and page. (You used to need an SEO plugin for this, but thankfully, it’s now included in the WordPress core.)
Just expand the “Permalink” section in the right-hand sidebar when creating any page or post.
For SEO purposes, you want to keep a slug clean and short, without unnecessary filler words or adjectives. That’s why our slug is
what-is-a-url, and not
Learn more about optimizing these settings in our ultimate guide to WordPress permalinks.
URL vs. Slug vs. Permalink
A URL is a link that leads to any webpage, file, or resource on the internet.
But when it comes to web addresses and WordPress, URL isn’t the only term we use. You may also have heard the word permalink or slug.
A permalink is a URL that acts as a permanent link to a specific piece of content on your WordPress site. (For example, https://kinsta.com/blog/what-is-a-url is the permalink to this post.)
A slug is the last part of the URL after the domain name and WordPress folder that identifies a specific page:
what-is-a-url. Slugs should be short, readable, and clearly indicate the content of the page or post.
Read more about how slugs can impact your SEO (not the gastropod).
A URL is simply any web address that you can use to access a page or file. It’s a basic web technology that helps you navigate the internet.
Redirecting an Old URL
If you move an old page or post, you might wonder if there’s any way to ensure you can still get the traffic and links from the old URL.
For example, you might update the slug by year from 2019 to 2020, change your domain name, or any number of things. Luckily, redirects are easy to set up.
You can set up redirects from your hosting dashboard, like our custom-developed MyKinsta, or a generic cPanel:
The status code indicates to the browser and search engine crawlers the status of the redirect. 301 means the redirect is permanent, that you have moved the post to a new location.
It’s ideal for SEO, as it passes most of the original authority and “link juice” the old article had to the new one.
There are many ways to set up a WordPress redirect, including using plugins or even editing your server environment manually.
URL Shorteners: When You Should Use Them
If a URL is extra-long, it may be tempting to use a URL shortener when sharing it in social media posts or emails.
If you’re linking to a specific part of a post with a long anchor, or want to hide your UTM parameters, it’s a good idea.
A few rules of thumb:
- Only use reputable URL shorteners (like Bitly or TinyURL) without any advertising breaks or slow loading times. Any ads or added time mean fewer users stick around to visit the page.
- If a URL is already short and makes sense (like kinsta.com/wordpress-hosting) sharing the original version is better.
- Never use shortened URLs for hyperlinks, as the URL is hidden behind the link text anyway.
A shortened URL (or short link) is mostly useful for sharing on social media, emails, or in videos.
Most SEO experts consider a shortened URL to have no negative impact on your SEO or search rankings in 2020.
By now you should be familiar with what a URL is, all the way down to its building blocks of domain name, path, and the underlying protocols.
To get the most out of your site’s URLs, it’s important to keep them short and to the point, and include the topic of every page.
Don’t forget to redirect old URLs when you make changes, especially for ones that have already attracted backlinks and were generating organic traffic to your site.
What are your experiences? Have you ever changed a URL on your site? Have you ever noticed a weird URL when browsing the web? Let us know in the comments!