Parts of a URL
A Uniform Resource Locator (URL) is a unique web address that enables internet users to locate a specific website or online protocol without having to know its IP address. While a URL might seem like an insignificant detail when planning how to.make a website and the makeup of its site infrastructure, its structuring can reveal a lot about a website’s potential user experience. If it’s hard to read, too long, too complex or suggests an insecure connection, that alone may send a visitor to hit the “Back” button.
What are the parts of a URL?
A URL’s anatomy depends on the page’s location as well as the complexity of the site. Let’s break down the parts of a URL:
A domain name is the main hub of a URL, and all other pages stem from it.
The second-level domain (SLD) is the brand or website name that appears in the URL.
The top-level domain (TLD) name, which specifies the website type, follows the SLD. The most common TLDs are .org, .com and .net. Some TLDs (like .info, .edu, .store, .biz,.tv,.co or .tech, .gov) describe the business or entity behind the website. Other TLDs ( .de, .r, .co.uk, .in, .mx, .ch, .nl, .be) are geo-specific.
Tip: When you make a website, you can get a free domain if you have a premium account.
A subdomain is a division of a website. By creating a subdomain, webmasters can organize website areas with different functions. Brands commonly create subdomains to create sections for shops, blogs, forums, support portals, and so on.
A subdomain usually maintains the same branding as the main domain. However, the design may differ slightly to establish a custom look for that site area.
The subdomain appears in the URL after the scheme and before the domain name.
Technically, www. is a subdomain. While some websites continue to use the www. before the domain name, most browsers don’t require it.
The scheme represents the protocol that the server will use to access the page. The most common schemes are HTTP (Hypertext Transfer Protocol) and HTTPS (Hypertext Transfer Protocol Secure).
The scheme always precedes the rest of the information in the URL. A colon (:) and double slash (//) always follow the scheme.
URLs can use many schemes. For instance, ftp:// gives users direct access to a file transfer protocol. Another example is mailto:// which will open the system’s default email application.
A path is the part of a URL that displays the specific location on the website where the user wants to go. It can contain directories, folders, as well as specific page and file names.
When a server cannot locate the stipulated path—either because a user incorrectly typed it or the page no longer exists—a 404 error page appears.
Query string & parameters
A query string appears in the URL after the path with information on the resulting web page. This string commonly appears on dynamic pages such as search result pages. It begins with a question mark (?) and parameters follow it. Parameters are snippets that explain how a query has filtered data. An ampersand (&) separates each parameter.
In this example, we see three parameters in the query string:
q: This tells users that they’ve searched for the word “domain.”
type: This tells users that search results only come from the “blogs.”
sort: This tells users that they’ve ordered results starting with the “newest.”
Parameters can tell users (and search engines) more about the resulting page. They provide information on encoding, language, browser support, product filters, traffic source, marketing campaign and more.
A fragment is another URL component that may appear after the path. The fragment tells the browser which web page section to scroll to.
A pound sign (#) precedes a fragment. The section has a specific id attached to it, which the URL fragment calls on.
The fragment is common on home pages as a way to direct users to sections that appear lower on the page. If you don’t want users to miss a critical step or information, ensure they get there with a click-to-scroll trigger.
You may be interested in:
How do URL parts affect UX and SEO?
The URL might seem like a random collection of words and symbols, but it's far from it. Your URL structure can greatly impact user experience and, subsequently, how well the web page ranks on organic search engine results pages.
Your URL structure can affect both your site’s user experience (UX) and search engine optimization (SEO) in the following ways:
Using the HTTPS scheme versus HTTP means that you’ve encrypted the web page. Not only does the HTTPS scheme display a trust mark in the browser so that users know the participating network servers have secured the session, but search engines can detect this too. Google has used HTTPS as a ranking signal since 2014.
Choosing a domain name entails more than just sticking a TLD onto the back of your brand name. You want a concise, memorable, and easy-to-spell domain name. In some cases, that means abbreviating it. By providing users with a simple-to-spell URL, organizations make it easier for users to recognize the brand when they encounter it elsewhere.
In addition to abbreviating the domain name, you should also make all the letters lowercase and remove the spaces from it. When it comes to the URL path, however, you should use dashes (-) to separate words.
Because file paths can become quite long, the dashes help improve the readability of the sub-categories and page names the deeper into a website’s hierarchy one goes.
Search engines can access a sitemap that tells them where you’ve placed everything on your website. However, that doesn’t mean that you don’t have to organize your site or URL structures.
The URL path and everything that follows it needs to be as concise and clear as the domain name itself. An unsightly URL string like this may discourage users from sharing the page with others. In addition, this URL structure can make it more difficult for search engines to index the content on your site.
FAQ (Frequently asked questions)
What are the main parts of a URL?
They are - domain, subdomain, scheme, path, string and parameters, fragment.
What is the difference between a URL and a URI?
A URL (Uniform Resource Locator) is a specific type of URI (Uniform Resource Identifier). A URI is a generic term for any kind of identifier that specifies a resource on the internet. A URL is a specific type of URI that specifies a resource on the World Wide Web
What is the purpose of a URL?
The purpose of a URL is to provide a way to identify and access resources on the internet. URLs are used by web browsers, search engines, and other applications to locate and retrieve said resources.