What Is a URL? A Complete Guide to Website URLs

3 months ago 30
ARTICLE AD BOX

What Is a URL?

A azygous assets locator (URL) is the code of a circumstantial webpage oregon record (such arsenic video, image, GIF, etc.) connected the internet.

It's what you benignant into your browser's code barroom to entree an online resource.

A URL highlighted successful  the browser's code  bar

How Do URLs Work?

Here’s a speedy breakdown of however URLs work:

When you benignant a URL into your browser's code bar, you're giving your browser circumstantial instructions connected wherever to spell connected the internet.

Once it knows that, the browser sends a petition to a web server astatine that address. This server is simply a almighty machine that stores the webpage oregon record you're trying to access.

Once the server processes your request, it sends backmost the requested assets (webpage, image, video, etc.).

Your browser past displays the contents of that assets connected the screen.

An illustration of a browser requesting a assets  from the server, and the server sending backmost  the resource

This enactment betwixt your browser, the URL, and the web server is the cardinal process that powers the net arsenic we cognize it.

Why Are URLs Important?

A URL points your browser to the nonstop spot—be it a webpage oregon file—that you privation to view.

This matters due to the fact that determination are billions of resources crossed much than a cardinal websites. 

URLs uniquely place each one, from your homepage to your dog’s Instagram account. And get you wherever you privation to go.

This payment is connected the user’s side.

On the website developer’s side, URLs are arsenic crucial.

Developers usage URLs erstwhile handling a website’s hypertext markup connection (HTML). 

They usage URLs to make links betwixt antithetic pages utilizing the anchor element (also called an <a> tag). This lets you link webpages and allows users to navigate betwixt them.

An URL shown successful  page's HTML

What’s more, URLs besides let separating codification into chiseled files that tin beryllium linked together.

So each your cascading benignant expanse (CSS) files, JavaScript files, and different assets tin beryllium organized cleanly. The HTML conscionable needs to notation those URLs to propulsion everything unneurotic for the last webpage.

Now, let’s recognize however URLs are structured.

What Are the Different Parts successful URL Structure?

The operation of a URL breaks down into 5 chiseled parts. Like this:

An illustration  URL with marked parts that work   "scheme," "authority," "path," "parameters," and "anchor"

Scheme

The strategy is the archetypal portion of the URL. It indicates the protocol for accessing the resource.

" portion  marked arsenic  "scheme"

A protocol is simply a acceptable of rules for however a transportation betwixt a browser and a web server should beryllium established.

Common schemes you mightiness admit are:

HTTP

Hypertext transportation protocol (HTTP) is simply a modular protocol for establishing a transportation betwixt a browser and a web server.

When you participate a URL with the “http” prefix, your browser sends a petition to the server to retrieve the assets specified successful the URL.

The server past responds by sending backmost the requested assets if it’s available.

But this transportation isn’t secure. Which means anyone tin intercept and work the data.

An illustration showing however  HTTP works, with hackers' being capable  to intercept data

This creates a superior information loophole. That’s wherefore websites (and hunt engines) similar hypertext transportation protocol unafraid (HTTPS) these days.

HTTPS

This is HTTP's much unafraid sibling. That adds an encryption furniture to your web session.

This means that immoderate accusation transferred betwixt your browser and the server is encrypted and overmuch harder for outsiders to intercept. 

An illustration showing however  HTTPS works, with information  being encrypted

Besides HTTPS, browsers tin besides grip different schemes similar record transportation protocol (FTP) and mailto.

Further reading: HTTP vs. HTTPS: Differences, Benefits, and Migration Tips

FTP & Mailto

FTP is utilized for transferring files betwixt a browser and a web server.

When you participate a URL starting with "ftp," it initiates a transportation to your FTP server. 

Then, you tin negociate your website files. Meaning you tin download oregon upload immoderate files you want.

Unlike HTTP and HTTPS, FTP is focused solely connected the transportation of files. Not rendering webpages. And a emblematic FTP URL looks thing similar this:

ftp://ftp.host.com/

The mailto strategy is utilized to make a hyperlink that opens the user's email lawsuit (Outlook, Gmail, etc.) to nonstop an email.

When you click connected a nexus with this prefix, it automatically opens your default email lawsuit and pre-populates the recipient's email code to what was specified successful the URL.

Clicking connected  the mailto strategy  opens an email lawsuit   and pre-populates the recipient's email address

This is convenient for letting users rapidly nonstop emails to contacts listed connected websites without having to transcript and paste their email addresses.

While not arsenic commonly utilized arsenic HTTP oregon HTTPS, some FTP and mailto play important roles successful circumstantial contexts.

Authority

The authorization is the 2nd portion of a URL that comes aft the “://” quality pattern.

443" portion  marked arsenic  "authority"

It tells your browser wherever to find the tract and who it belongs to. 

This portion of the URL consists of 4 main components:

Subdomain

A subdomain is simply a drawstring of letters oregon a implicit connection that appears earlier a URL’s archetypal dot.

An URL with "www" portion  marked arsenic  "subdomain"

The astir fashionable subdomain is www. It stands for satellite wide web, communicating that the URL is simply a web address.

In the past, it was communal to usage www. But you tin omit it from your URLs if you want.

It doesn’t substance whether you usage it. It each depends connected your idiosyncratic preference.

Domain

A domain is the sanction of a website. Like eBay, Expedia, oregon Semrush.

An URL with "example" portion  marked arsenic  "domain"

It’s an easy-to-remember portion of the URL.

Each domain is unique. So whenever you benignant it in, you notation a circumstantial website you mean to visit. 

Top-Level Domain and Country-Code Top-Level Domain

The top-level domain (TLD)—also called domain extension—is the portion that comes aft the sanction of your website. Like “.com.”

An URL with ".com" portion  marked arsenic  "TLD"

You’ll travel crossed galore TLDs connected the internet. Here’s a database of 5 of the astir communal ones and which kinds of websites usage them:

  • .com: Commercial websites
  • .org: Nonprofit organizations
  • .net: Software and hosting companies providing web services
  • .edu: Educational institutions (universities, colleges, schools, etc.)
  • .gov: Government agencies and departments

Additionally, determination are country-code top-level domains (ccTLDs).

ccTLDs are two-letter domain extensions that bespeak a website’s relation with a circumstantial state oregon territory.

Examples include:

  • .uk for United Kingdom
  • .de for Germany
  • .cn for China
  • .ca for Canada
  • .in for India
  • .es for Spain
  • .au for Australia
  • .nz for New Zealand

Websites usage ccTLDs erstwhile their people assemblage is predominantly based successful a circumstantial country.

By utilizing ccTLD, a website signals its transportation to that location. Which tin assistance to found spot and credibility with users successful that region.

Port

A larboard is the numerical identifier that specifies a peculiar gateway for directing postulation to your web server.

443" portion  marked arsenic  "port"

It’s similar a doorway radical walk done to sojourn your site.

Most of the time, you don't spot larboard numbers successful URLs due to the fact that they're utilizing modular ports. Which browsers presume by default (e.g., larboard 80 for HTTP and larboard 443 for HTTPS).

Path

The adjacent portion of the URL is the path. And it indicates the circumstantial directions to the leafage (or resource) being requested connected a domain.

An URL with "resources/newpage.html" portion  marked arsenic  "path"

It’s similar the nonstop way you instrumentality to a country successful a ample gathering (the domain).

Generally, the way is made up of 2 parts:

Subfolder

A subfolder (also called a subdirectory) is simply a folder oregon directory located successful the main directory that houses the leafage a idiosyncratic has requested.

An URL with "resources" portion  marked arsenic  "subfolder"

Subfolders let websites to signifier related pages unneurotic wrong the domain's wide directory structure.

Like this:

An illustration  of domain's directory structure

Here, "blog" and "news" are subfolders wrong the main domain that some signifier related content.

URLs for these 4 pages would look thing similar this:

  • https://www.example.com/blog/first-post
  • https://www.example.com/blog/second-post
  • https://www.example.com/news/first-news-article
  • https://www.example.com/news/second-news-article

Slug

A slug is the past conception of the way that identifies a peculiar page. Often, successful a human-readable format.

An URL with "newpage.html" portion  marked arsenic  "slug"

It helps users recognize wherever precisely they are connected the website.

Parameters

Parameters (or query strings) are an optional portion of a URL that comes aft a question people (?).

An URL with "?key1=value1&key2=value2" portion  marked arsenic  "parameters"

They modify the contents of a leafage based connected the key and value specified.

The cardinal is similar a statement that says what to change. The worth specifies the nonstop modification criteria.

Let’s usage the illustration URL beneath to recognize this better.

//www.example.com/blog?category=fitness"

In this example, “category” is the cardinal and “fitness” is the value. This parameter volition use a filter to a webpage to show lone fitness-related blog articles.

You tin adhd aggregate parameters to a URL by separating them with an ampersand (&).

//www.example.com/blog?category=fitness&sort=newest"

Now, determination are 2 parameters: “category” with the worth “fitness” and “sort” with the worth “newest.”

This applies a filter to a webpage to amusement blog posts astir fitness. And displays them from newest to oldest.

For much accusation astir parameters and however to usage them connected your website, work our afloat usher to URL parameters.

Anchor

An anchor (also called a fragment identifier) is the optional past portion of the URL that takes users to a circumstantial conception wrong a webpage. 

It comes aft the fig (#) symbol.

An URL with "#faq" portion  marked arsenic  "anchor"

In the illustration above, the browser volition straight scroll to the FAQ conception of the webpage alternatively than opening the webpage astatine the top.

But anchors aren’t conscionable constricted to substance content.

For a video oregon audio file, the browser volition leap straight to the clip specified successful the anchor.

For example, a URL similar https://www.example.com/video#t=2m30s volition nonstop the browser to commencement the video straight astatine the two-minute and 30-second mark.

What Are Some URL Examples?

Now that you cognize the components URLs tin include, let’s spot however combining them tin make a wide scope of URLs:

http://domain.com/
ftp://ftp.domain.com/downloads/software/setup.exe
https://www.domain.com/news/new-ai-tool
http://www.domain.com/resources.html
mailto:[email protected]
https://domain.com/products/t-shirt/men?color=black&brand=nike
https://domain.com/collection#newlylaunched

All these URL formats are valid. They constituent to chiseled resources. 

And immoderate of them adjacent service unsocial functions. Like record absorption with the FTP protocol and email connection with the mailto protocol. 

What Are the Main Types Of URLs?

URLs tin beryllium categorized into antithetic types based connected their operation and purpose. Here are immoderate communal types:

Absolute URLs

An implicit URL provides the implicit web code to a resource, including the protocol (like HTTP oregon HTTPS), domain name, path, and perchance different components similar parameters and anchors.

Absolute URLs are commonly utilized erstwhile linking from 1 website to another. And erstwhile sharing links online.

Here are immoderate examples of implicit URLs:

https://www.domain.com/section/science
https://domain.com/wiki/sleep
https://domain.com/products/

Relative URLs

A comparative URL lone specifies the path. Meaning the directory and the slug.

One usage lawsuit for comparative URLs is to nexus betwixt pages wrong the aforesaid website to make internal links.

This avoids repeating the basal domain and protocol successful each interior link.

Here are immoderate examples of comparative URLs:

documents/report.pdf
archives/article123
blog/what-is-internet

URLs are besides classified based connected the circumstantial intent they serve. So, let’s look astatine these types of URLs now.

Canonical URLs

A canonical URL is the superior URL for a acceptable of duplicate URLs connected your site.

A canonical URL illustration

Duplicate URLs are pages that fundamentally person the aforesaid content. 

For example, the aforesaid contented could beryllium disposable on:

  • https://www.example.com/products
  • https://www.example.com/products/
  • https://www.example.com/all-products

The canonical URL would beryllium defined arsenic 1 of those options. Let’s accidental it’s https://www.example.com/products.

Specifying a canonical URL helps hunt engines fig retired which URL to scale (store successful its database) and amusement successful hunt results. (Search engines wouldn’t intuitively cognize this if duplicate contented exists connected antithetic URLs.)

Callback URLs

A callback URL is the leafage users are automatically redirected to erstwhile they implicit a circumstantial enactment oregon task. 

For example, erstwhile a idiosyncratic logs successful to a website utilizing a third-party authentication work similar Google, the leafage they’re redirected to aft successfully authenticating with Google is the callback URL.

A callback URL illustration

Vanity URLs

A vanity URL is simply a customized URL that is short and casual to share compared to the URLs you usually see. 

Vanity URLs are utilized successful selling campaigns oregon connected societal media to beforehand a circumstantial webpage connected your site. 

You tin usage URL shortener tools similar Bitly, TinyURL, and Short.io to make them.

Here’re immoderate examples of vanity URLs:

domain.com/sale
domain.io/BestDealsNow
domain.com/discount
domain.org/charity

How to Use URLs

URLs are almighty tools. And you tin usage them efficaciously if you recognize their relation successful antithetic contexts, similar web browsers, HTML, and different technologies.

Browser

Using URLs successful a web browser is the astir communal mode radical interact with them. Here’s how:

  • Entering URLs: Simply benignant the URL into the code barroom of your browser and property the “Enter” oregon “Return” key. The browser volition past navigate to the specified webpage oregon resource.
  • Bookmarks: You tin prevention URLs arsenic bookmarks successful your browser for casual entree successful the future
  • Browsing history: Browsers support a past of the URLs you've visited, allowing you to easy instrumentality to antecedently viewed pages

HTML

In HTML, URLs are utilized for:

  • Hyperlinks: URLs are utilized successful anchor (<a>) tags to make hyperlinks. These links let users to click and navigate to different webpages oregon resources.
  • Embedding resources: URLs are utilized to embed images, videos, and different resources into webpages. For instance, an representation (<img>) tag mightiness person a root (src) property that contains a URL pointing to an representation file.
  • Linking CSS and JavaScript: URLs are utilized to nexus outer CSS files and JavaScript files to HTML documents, enabling you to abstracted of content, style, and functionality

Other Technologies

URLs besides play a captious relation successful assorted different technologies. Here are a fewer communal uses:

  • Social media: URLs are utilized to stock web contented connected societal media platforms. When you station a URL, galore societal media sites tin fetch and show a preview of the content.
  • QR codes: QR codes tin encode URLs. When scanned with a smartphone, they nonstop the idiosyncratic to a webpage, often for selling oregon informational purposes.
  • Email: URLs are often included successful emails to nonstop recipients to webpages for promotional purposes, idiosyncratic verification (like email confirmation links), to supply further reading, etc.

How to Optimize URLs for SEO

If you privation your website URLs to amusement up successful hunt results and bring postulation to your site, you request to absorption connected search motor optimization (SEO)

SEO involves optimizing antithetic parts of your website (including your URLs) to fertile higher successful hunt engines’ integrated (unpaid) hunt results. Which look alongside paid results.

Paid vs integrated  results connected  Google SERP

Here are immoderate tips connected however to optimize the operation of your URLs.

1. Use the HTTPS Protocol

Since HTTPS is much secure, hunt engines similar Google usage it arsenic a airy ranking signal.

So if your website uses HTTPS, you person a flimsy ranking vantage implicit those who don’t usage it.

2. Choose an Appropriate TLD

For the astir part, TLDs don’t straight power your rankings.

But you should usage the 1 that aligns with your business. For nonprofit organizations, .org is best.

For acquisition institutions, specified arsenic universities, colleges, and schools, .edu is the astir due TLD.

For commercialized websites, .com is the mode to go.

If you lone bash concern extracurricular the U.S., your ccTLD( similar .au for Australia and .nz for New Zealand) is besides fine.

But debar utilizing TLDs similar .info and .biz—people thin to subordinate these with spam. So you mightiness person a hard clip gathering high-quality backlinks to your site. Which are important to amended rankings.

3. Use Subfolders to Organize Your Content

Use subfolders that logically signifier your contented and marque it casual for users to cognize wherever they are connected the website.

Which the American Lung Association has done:

American Lung Association's subfolders

This is important from a idiosyncratic acquisition (UX) constituent of view. Which is intimately connected to SEO.

Your subfolders should bespeak the benignant of contented recovered astatine that URL. To assistance hunt engines recognize your contented better.

  • Good subfolder: https://website.com/blog/best-travel-tips/
  • Bad subfolder: https://website.com/folder1/best-travel-tips/

If you ain a truly ample website—an ecommerce site, for example—it mightiness get tricky to signifier each your pages utilizing lone 1 level of subfolder.

In that case, usage sub-subfolders to further specify your website hierarchy.

Here’s an illustration of however you could person a subfolder wrong different subfolder connected your site:

https://store.com/men/tshirt/tommy-hilfiger/

4. Optimize Your URL Slugs

You request to bash 4 things to optimize your URL slugs for SEO.

Be Descriptive

Your URL slug should picture the page’s contented due to the fact that it helps the hunt motor recognize what the leafage is about. And fertile it appropriately.

Good URL slug: /best-baby-soaps/

Bad URL slug: /page1234/

The champion mode to marque your URL slugs descriptive is to usage the page’s people keyword (the keyword you privation to fertile for successful hunt results). 

If you don’t cognize what your people keyword is oregon however to find one, work our usher to keyword research.

Make It Short

Long URLs are harder for users to read. And hunt engines similar Google often truncate agelong URLs successful hunt results. 

Like this:

An truncated URL connected  Google's SERP

So, effort to support your slugs to 5 words oregon fewer.

  • Good URL slug: /home-workout-tips/
  • Bad URL slug: /the-7-best-home-workout-tips-the-ultimate-cheatsheet-for-training-without-a-gym/

Use Hyphens to Separate Words

Use hyphens to abstracted words successful your URL slug alternatively of underscores. They're the modular mode of separating words successful a URL.

  • Good URL slug: /free-marketing-tools/
  • Bad URL slug: /free_marketing_tools/

Use Lowercase Characters

URLs are case-sensitive. And if you person a peculiar URL successful some lowercase and uppercase, it tin make duplicate content issues connected your site.

Plus, lowercase URLs marque it easier for users to participate the URL correctly. 

  • Good URL slug: /how-to-make-pizza/
  • Bad URL slug: /How-To-Make-Pizza/

Read our afloat usher to URL slugs for much information.

Audit Your Existing URLs to Identify Issues

If you’re a Semrush user, you tin usage the Site Audit instrumentality to cheque whether your URLs are acceptable up correctly. And find immoderate issues that are present.

Create a project successful the instrumentality and tally a afloat crawl of your website.

After the crawl is complete, navigate to the “Issues” tab and hunt for “URL.”

"URL" entered nether  the “Issues” tab successful  Site Audit tool

The instrumentality shows whether your website has immoderate URL-specific issues similar URLs being excessively long. Or words successful URLs that are separated with underscores alternatively of hyphens.

URL issues recovered  successful  Site Audit tool

The instrumentality besides offers proposal connected however to hole each issue.

URL contented   explained and however  to hole  it pop-up box

FAQs

To wrapper things up, let’s screen immoderate often asked questions astir URLs.

1. What Does URL Stand For?

URL stands for azygous assets locator. It’s the web code that specifies the determination of a assets connected the internet.

2. What’s the Difference Between a URL and a URI?

A azygous assets identifier (URI) labels oregon identifies a assets but doesn't needfully archer you however to retrieve it. 

For instance, isbn:0261103303 identifies the publication with that ISBN fig but doesn't bespeak wherever oregon however to get it.

A URL is simply a circumstantial benignant of URI that not lone identifies a resource, but besides provides the means of locating it.

For example, https://www.example.com/page.html is simply a URL that tells you the assets is the webpage located connected example.com’s server astatine /page.html. And uses the HTTPS protocol to entree it.

That’s the main difference.

URLs ever constituent to resources—URIs conscionable sanction them.

3. Is a URL an IP Address?

A URL is not the aforesaid happening arsenic an IP address, which lone identifies the domain name. 

URLs see further accusation similar protocols and record paths beyond conscionable specifying the determination (domain name). 

 Multiple URLs tin constituent to the aforesaid IP address. But each IP code tin lone place 1 domain.

4. Are URLs Case Sensitive?

The domain sanction information of a URL is lawsuit insensitive, according to Domain Name System (DNS) standards.

The lawsuit sensitivity of different components (path, parameters, anchor, etc.) depends connected your web server’s configuration. 

To beryllium consistent, dainty URLs arsenic lawsuit delicate adjacent if your server allows for mixed cases. And spell with lowercase capitalization for each parts of URLs. As it’s the modular mode of creating URLs.