Closeup on smartphone display screen with https and www url

Best Practices for Writing a Properly Optimized URL

If you spend any time online, then you’re probably interacting with URLs. If you run a website or an eCommerce store, you’re even more familiar with these web addresses that make navigating the Internet a breeze.

While you may not give much thought to how your URLs look, you definitely should. A well-structured URL can be the difference between showing up on the second page of a search engine’s results and disappearing among the rest of the web.

In this guide to URL strategy, we’ll be exploring how to craft a properly optimized URL—and why it’s worth spending the time to do so.

What is a URL?

URL is an abbreviation for Uniform Resource Locator. As the name suggests, URLs—also called web addresses—locate resources on the Internet. In this case, the “resource” is a particular web page, video, or photo from the web.

In other words, URLs are like street addresses in the real world—they point toward a specific “location.”

For example, if you head to our home page, you’ll see that the URL is If you were to type that URL into the address bar of any browser, it would take you directly to our website.

The Basic Structure of a URL

Most URLs that you’ll come across are relatively simple. However, some turn out a little more complex. To explain every portion of a URL, we’ll use a more complex example here.

To start, have a look at this made-up URL:

Let’s dissect this example of URL structure piece by piece:

  • https:// – This section of the URL is called the scheme. The scheme determines the protocol (i.e. how the resource will be obtained). An HTTP scheme is unprotected by secure SSL technology, while an HTTPS scheme is protected.
  • blog – This segment is the subdomain. Subdomains help you separate your website into more manageable pieces. www is the most common subdomain, but you’ll often see shop, blog, or a language identifier like en or fr.
  • examplewebsite – This is the domain. Your domain is essentially the name of your website.
  • .com – This piece is called the top-level domain (TLD). When you purchase a domain name, you buy the TLD and the domain together. Other TLDs include .co, .org, and .net.
  • topic – Here, topic indicates a subfolder. Subfolders are similar to subdomains in that they help organize your site.
  • url-structure – Finally, we have the URL slug. The URL slug is essentially the “name” of the web page itself. 

Some URLs also have query strings (which usually start with a ? symbol) and a fragment identifier (which begins with a # symbol). These additional sections give the browser even more information about how to display the web page. For the purpose of this guide, we’ll skip over those pieces (as should you when optimizing your URLs).

The Benefits of a Well-Structured URL

If you’re wondering how to build an eCommerce website or simply wanting to learn about optimized URLs, this can make a significant impact on the traffic your website gains. So, to summarize, a URL routes you to the “location” on the web that you want to visit. But if a URL is nothing more than a “map” to the web address you want to visit, why does its appearance matter—especially when some segments are unchangeable? 

As long as a map takes you where you need to go, its format is irrelevant, right?

Well, not exactly. Although URLs serve a utilitarian purpose, they also act as marketing tools. Well-structured URLs are essential because:

  • They promote user confidence – Clean, simple, logical URLs come across as more legitimate. Customers are more likely to click well-formatted web addresses and avoid URLs that look like spam.
  • They’re easy to read, write, and type – Remember that URLs don’t exist solely as clickable online links. They also appear on business cards, menus, and marketing materials. Sometimes, your employees may need to read out a URL to a customer. Although the mass adoption of QR codes has decreased the number of URLs you’ll see in the wild, there are still times when you’ll need to say or display a URL. The better it’s structured, the easier it’ll be for everyone.
  • They’re your first impression – If a user finds you by using a search engine like Google or DuckDuckGo, they’ll see your URL before they ever see your website’s content. For example, on a page of Google results, the URL is listed above the name of the web page. A poorly-formatted URL won’t give potential customers the right first impression.

However, the most significant benefit of having an optimized URL is improved search engine optimization (SEO).

URL Importance in SEO

SEO is the practice of following recommended steps to increase your unpaid web traffic. The goal behind SEO is to increase your website’s position in search engine results and therefore reach more people.

While you may be more familiar with using keywords and increasing website speed as methods of improving SEO, the URL also plays a role.

A concise, well-structured URL improves SEO performance by:

  • Encouraging more people to click your link
  • Encouraging more people to share your link
  • Making it easier for search engine crawlers to index your web pages

All of these factors can improve your SEO ranking. And while a properly optimized URL alone isn’t enough to dramatically boost your SEO ranking, it’s a crucial part of the puzzle.

How to Optimize a URL for SEO

For the most part, you’re in charge of your URLs. You decide how to structure your website and what to name each new page and post. With that in mind, optimizing each page’s URL for SEO as you make it is an effortless way to improve your score. But how do you create an SEO strategy for friendly URLs that’ll help you rank?

Here are some tips for optimizing your URLs to boost your overall SEO performance:

  • Keep it simple – Even though Google uses robotic spiders called crawlers to scan your web pages (seriously), your URLs should be legible to humans. Short, simple web addresses without extra parameters—called static URLs—are best. Simpler URLs simply rank higher.
  • Add SEO keywords to your URLs – Just as you would add relevant keywords to your content, sprinkle some SEO keywords into your URLs, too. The slug is the ideal place to put a long tail keyword. However, best practices to avoid keyword stuffing is to use only one target keyword.
  • Match your page title to your URL – If you can, keep your title tag as close to your URL as possible. When the URL clearly explains the contents of the post or page, search engines and humans alike will have a better idea of what to expect before clicking.
  • Use subfolders over subdomains – When you place subdomains like blog or shop ahead of your domain name, search engines treat each one like a separate website. If you get 10,000 visitors to your blog subdomain and 10,000 visitors to your shop subdomain, Google sees two websites garnering 10,000 hits each—not one site with 20,000 views. Because more traffic means a better SEO ranking, you’ll want to avoid this issue. Whenever possible, try to use subfolders instead. Here’s an example: and not
  • Use only lowercase letters – Similarly, you should aim to use only lowercase letters in your URLs—not uppercase letters, numbers, or special characters. Why? Search engines may see and as two different sites, even though they lead to the same page. Again, this confusion can negatively impact your SEO value.
  • Sign up for Google Search Console – Search Console is a free tool from Google that allows you to monitor your website traffic. Through Google Search Console, you can compare URLs to see which ones perform best, then optimize the rest of your web addresses accordingly.

Following these SEO best practices can ensure you’re avoiding keyword stuffing and an SEO-friendly URL can also help your page rank better. 

More Best Practices for URLs

Aside from the above tips that can help you improve your SEO, there are other URL considerations to keep in mind. As you write out your URL slugs and structure your website, try to implement the following best URL structure practices:

  • Use hyphens to separate words – When writing multi-word slugs for posts and pages, separate your words with hyphens instead of underscores or spaces. Spaces show up as %20 in address bars, while underscores disappear when a URL is underlined (which is a usual occurrence).

Bad URL:

Optimized URL:

  • Avoid articles – Words like a, an, and the aren’t needed in URLs. All they do is clutter up your web address.

Bad URL:

Optimized URL:

  • Avoid endless subfolders – Nesting content within several subfolders also makes your URL long and cluttered. Plus, while you’re unlikely to reach the limit, browsers like Internet Explorer have a maximum URL length of 2,083 characters.

Bad URL:

Optimized URL: websites

Optimize Your Whole Website with WP Engine

Optimizing URLs is one of many ways to improve SEO and keep your WordPress website looking professional. However, as mentioned, refining your URL structure isn’t a golden ticket to first-page search engine results. The best approach is a varied one that includes using the best SEO tools and following other general SEO tips for WordPress—which, by the way, is one of the best content management systems for SEO. Once you’ve got your optimized URL, you can consider including WooCommerce shipping plugins and other additions to streamline your online storefront operations.

Looking for more WordPress support for your site? The experts at WP Engine are here to help. Between our frequently updated resource center and our award-winning staff, we can take your website from decent to dazzling. Contact us today to find out more!

Get started.

Build faster, protect your brand, and grow your business with a WordPress platform built to power remarkable online experiences.