URL Best Practices: How to Optimize Your Website For Search Engines

Do you want to attract consistent, long-term free traffic to your website?

If your answer is yes, organic search is the way to go.

However, performing well on search engine results pages (SERPs) can be challenging since there are many SEO factors that are beyond your control.

Despite this, on-page optimization is something that you can control and take advantage of to improve your website’s visibility on SERPs.

One of the key place to optimize on your page is the URL.

what is a URL?

URL stands for Uniform Resource Locator.

It is a unique address that identifies a specific web page or resource on the internet.

A URL contains information about the location of the page, as well as instructions on how to access it.

a complete URL

URLs help users access web pages and resources from anywhere in the world.

They are also important SEO factors, as they help search engines understand the content on a web page.

how to structure a URL

A URL contains several parts:

1. Protocol or Scheme

The protocol indicates to the browser how to access a web page.

This can be “http://” or “https://”, which indicate standard or secure connections respectively.

unsecure http protocol

HTTP stands for hypertext transfer protocol and the S in HTTPS stands for secure.

The secure/https protocol has a lock icon next to it in the address bar.

secure https protocol

It encrypts and protects users’ information such as credit card and login details from hackers.

2. Subdomain

The subdomain is anything that comes after https://, such as www (https://www.youtube.com/) or health.google (https://health.google/).

www. stands for World Wide Web and is the most popular subdomain, however, it is not used much anymore.

Many companies have their own subdomains. Google for instance has sites.google, health.google, among others.

If you create a site on Blogspot or the free WordPress, it would be a subdomain on those platforms.

If you have a domain you can create a subdomain as well.

3. Domain name

This is the name of the website or server that hosts the resource or information you’re searching for.

For example, “marjorieduncan.com” is the domain name for this website.

Related: How To Create A Website In 2021: Free vs Paid {Guide For Beginners}

4. Top-Level Domain (TLD)

The TLD is the last part of the domain name and indicates the type of organization or location of the website.

Common TLDs include “.com (commercial)”, “.org (nonprofit organization)”, “.gov (government)”, and “.edu (education)”.

There are many other TLDs, those are just a few of the most popular ones.

You’ll also come across country code top-level domains (ccTDLs).

ccTLDs have two letters that indicate the country, such as in. for India or .ca for Canada.

If you have a business and you want to target an audience from your specific location then you can use a ccTLD.

5. Path or Subfolder

The path indicates the specific location of the resource on the server.

It includes the folder and file names. For example, “/blog/post-1/” is the path to the first post in a blog.

i.e. the first post can be found in the blog folder.

Subfolders make it easier for visitors to understand and find your content.

6. Slug

A slug is a user-friendly version of the URL that is used to identify a specific page or resource.

It is often used in the URL structure of a website, and it typically contains keywords related to the page’s content.

The difference between a URL and a slug is that the URL contains all the parts needed to access the resource, while the slug is just a user-friendly identifier for that resource.

7. Parameters

URL parameters, also known as query strings, form a segment of a URL located after a question mark (?).

They consist of a key-value pair separated by an equal sign (=).

The key signifies the nature of the data being transferred, while the value represents the actual data being sent.

You can add more than one parameter to a URL by using an ampersand (&) to separate them.

Some of the different types of parameters are:

  • Search parameters: users can query a website’s internal search engine to retrieve relevant results.
  • Filter parameters: enable users to sort and filter listings displayed on pages. Listings can have different types of content such as clothing products, which can be filtered by different attributes like color or size.
  • Tracking parameters: allow you to monitor traffic originating from your marketing campaigns.
  • Paginating parameters: facilitate the organization of blog archive pages and forum threads into multiple pages, improving their readability and navigability.

different types and functions of URLs

URLs are categorized into two types: absolute and relative.

An absolute URL includes the protocol, subdomain (www), domain name, subfolder/directory, and slug.

For example:

On the other hand, a relative URL only includes the subfolder and slug).

For example:

There are a number of different URLs and they can also be categorized by their functions.

Some of them are

  • Canonical URLs are used to address duplicate content issues that might impact your search engine rankings.
  • Callback URLs are the pages that users are redirected to after completing a task. For example, login into another site using your Facebook details.
  • Vanity URLs are the shortened version of a URL. URLs can be shortened using tools like Bitly and TinyURL, which makes them easier to share.

how to optimize a uRL

Optimizing your URLs for better search engine visibility is an important aspect of SEO.

By following these best practices, you can ensure that your URLs are easy to understand, relevant to your content, and optimized for search engines.

1. Use HTTPS

HTTPS helps keep people’s private information safe when they visit your website.

Google also likes it when websites use HTTPS, which can help your website show up higher in search results.

To use HTTPS, you need to get something called an SSL certificate.

Your hosting provider can set it up on your website.

2. Use keywords in your URL

Including relevant keywords in your URL can help search engines understand what your page is about.

For example, if you’re writing an article about “How to bake a cake,” your URL should ideally contain the keywords “bake” and “cake.”

3. Keep it simple and easy to read

Your URL should be easy to read and understand for both humans and search engines.

Avoid using complicated or meaningless strings of characters, as this can make it difficult for search engines to decipher what your page is about.

4. Keep it short

Shorter URLs are easier for users to remember and share, and they also tend to perform better in search engine results.

Try to keep your URLs under 100 characters whenever possible.

5. Use hyphens to separate words

When creating your URL, it’s important to use hyphens to separate words.

This helps search engines understand where one word ends and another begins, making it easier for them to parse your URL.

6. Avoid using stop words

Stop words are common words like “the,” “a,” “an,” and “of” that doesn’t add any meaning to your URL.

Avoid using stop words in your URL as they can make it harder for search engines to understand what your page is about.

7. Use lower-case letters

It’s important to use all lowercase letters in your URLs.

Having lowercase letters make it easier to type and avoid mistakes.

8. Don’t use subdomains

The use of subdomains in your URLs won’t help your SEO.

Your URL will be shorter if it does not contain a subdomain in it.

Some people think subdomains make it harder for search engines to understand your website, which could make it harder for your website to show up in search results.

Using subfolders is the safer choice for making sure your website shows up in search engines.

9. Use subfolders

It’s important to keep your content organized in folders.

These folders should have names that tell you what kind of stuff is inside them, this makes it easier for people to use your website.

They also help Google to understand what your website is about.

10. Use canonical URLs

If you have multiple pages with similar content, it’s important to use canonical URLs to indicate which page is the primary source of the content.

This can happen when the same content is accessible from different URLs due to parameters or session IDs.

For example, a blog post might be accessible from: https://www.example.com/blog/how-to-optimize-urls-for-seo https://www.example.com/blog/how-to-optimize-urls-for-seo/?utm_source=google

Both URLs lead to the same content, but the second URL includes a parameter that could cause search engines to see it as a separate page.

A canonical URL can be added to the HTML header of the page, indicating the preferred URL for search engines to index.

This helps avoid duplicate content issues and ensures that your primary page gets the credit it deserves.

11. Avoid using session IDs and other dynamic parameters

Session IDs and parameters are instructions that can be added to a URL to provide additional information to the server.

Session IDs are often used to identify a specific user’s session, while parameters can be used to provide search queries, tracking information, or other data.

These can make your URLs look messy and complicated, and they can also cause issues with duplicate content.

For example, a URL might look like:


In this URL, the parameters are “category=electronics” and “sort=price”. They tell the server to display products in the electronics category sorted by price.

Whenever possible, try to avoid using these types of parameters in your URLs.

how to set up a uRL in wordPress

Setting up URLs in WordPress is quite easy. Here are the steps:

1. Log in to your WordPress dashboard.

2. In the left-hand menu, click on “Settings,” and then click on “Permalinks.”

3. Choose the permalink structure that best suits your needs. For example, the “Post name” structure is a popular option for bloggers.

4. If you want to add a custom base to your URLs, you can do so in the “Optional” field.

5. Click “Save Changes” to save your new permalink structure.

You can also edit the URL of a single page.

This can be done from the page’s editor on the right panel.

wrapping up

URLs are a fundamental element of the internet and play a critical role in search engine optimization (SEO).

Understanding the different components and types of URLs is essential for website owners and content creators who want to improve their website’s visibility in search engine results pages (SERPs).

By following the tips above for URL structure and optimization, you can increase your chances of attracting more visitors and achieving your online goals.

Leave a Comment