WordPress URLs: 5 Simple Steps To Creating the Best URL Structure

custom-wordpress-urls

Sarah Danks | January 20, 2016

Default URLs in WordPress = Hideous

First things first: let’s talk about the obvious. If you use WordPress for your website and/or blog, you know there’s a default setting for the URL (permalink) structure…

…and it ain’t pretty.

In my post on how to go about internal linking on your site, I mentioned URL structure. Namely, how it’s important for SEO. Well, if you use the default permalink setting in WordPress, your URLs end up looking like this:

www.mysite.com/?p=37 or www.mysite.com/?page_id=37 

Ick.

What’s the number stand for? Well, it’s the post — or page — ID number. Efficient? Yes.

Aesthetically pleasing? No.

Now, while Google — and the other search engines — can certainly index those types of URLs, the fact of the matter is, they’re ugly to look at and they’re not helpful to USERS.

And that, my friends, is Google’s pet peeve — not helping users. But luckily you have other options, and you don’t even have to be a developer to break out of the default URL structure and create usable, friendly permalinks.

Common Permalink Settings

The good news is that WordPress doesn’t restrict you to doing it their way; they’re like the Burger King of platforms — they offer you five “preset” options for your URL structure, along with the way we recommend: customized URLs.

changing-default-wordpress-urls

As you can see, I’m somewhat opinionated about the various methods WordPress offers for URLs. Let’s look at the various settings listed above and how this particular post would look if I used them:

  • Default: thinksem.com/?p=162
  • Day/Name: thinksem.com/2015/12/10/5-steps-to-create-best-wordpress-urls/
  • Month/Name: thinksem.com/2015/12/5-steps-to-create-best-wordpress-urls/
  • Numeric: thinksem.com/archives/162
  • Post Name: thinksem.com/5-steps-to-create-best-wordpress-urls/
  • Custom: thinksem.com/blog/5-steps-to-create-best-wordpress-urls/

Obviously I think the worst two options are the default and numeric settings; day or month and name options are okay — at least better than the default! — and the best of the bunch are the last two: post name and custom.

You can see we’ve set up our custom parameters as thinksem.com/blog/%postname%/, which is specific to the blog. See, we want all blog posts to fit into the blog “folder,” so that’s why we have this custom structure. The rest of the website adheres to the “parent/child” folder structure.

Why Custom URLs Are Best

We — and most of the website world — choose to write our own custom URLs for our website and blog posts, which makes the most sense for

a) search engines, and

b) users.

There are lots of reasons search engines and users prefer custom URLs. On a high level, they like them because they’re easy-to-read, they give context…

…and they make the (online) world a prettier place. And who doesn’t love that?

First and foremost, your URL helps tell readers what your page is about in the search snippet, so you want to be sure to use it to your advantage.

Why? Well, so search engine users feel compelled to click through to your page, of course. Along with your title tags and meta descriptions, URLs are the only other text enticing users on a search engine results page (SERP):

easily-readable-urls-in-serp

(My search query was “stuffed chicken recipes,” for reference.)

Notice how, in the SERP above, almost all of the URLs listed have good information packed into their structure? The one loner in the group is the Food Network. While that page is relevant, I have to rely on the <title> tag and meta description to tell me what the page is about, since the URL “structure” shown isn’t helpful.

(The URL of the page is actually foodnetwork.com/stuffed-chicken-breast-recipes.html, but the website is using schema markup to show the “breadcrumb” instead of the real URL. In this case, I don’t like that, because the URL of the site exactly matches my search query.)

Google itself even says — within its SEO Starter Guide — that creating friendly, custom URLs is best:

“Creating descriptive categories and filenames for the documents on your website can not only help you keep your site better organized, but it could also lead to better crawling of your documents by search engines.

They go on to say that easier-to-read, user-friendly URLs help your site when others link to your content. Why? Because anchor text matters, folks, and if someone links to a page on your site using only the URL, the URL itself becomes anchor text.

So, if Google thinks custom URLs are best for users, then why does WordPress insist on an ugly duckling default structure? No clue.

Suffice it to say you need to change the default settings and write your own. But how to go about it?


5 Steps to Writing The Best Custom URLs

Writing custom URLs takes more work than just stringing some words together and hoping it’s good enough. No, you need to put some thought into your URLS — just like you do with your blog post titles, headlines, image alt text and other meta data.

Basically, you want your on-page SEO tactics intuitive enough that anyone can figure out what your page topic is at a glance. The simple way we like to think of it here is, “if someone were blind and using a screen reader to consume our content, how would we describe it to them?

So you need to use descriptive text — read: keywords — in your URLs.

But, as Rand outlined in his URL best practices article, it’s not so much about keyword usage as it is about readability (I’m stealing this image from his post!).

scale-of-url-readability

It’s not enough just to choose “Custom Structure” in the WordPress settings; you need to be prepared to take the time to write GOOD custom permalinks.

Here’s my 5-item checklist for writing readable, helpful, friendly custom permalinks:

  1. Make URLs descriptive and easy-to-read, yet simple.
  2. Keep them short, but don’t truncate to the point of confusion.
  3. Use hyphens to separate words, not spaces (or even underscores — and please don’t runallthewordstogether).
  4. Stick to all lowercase letters.
  5. While it’s good to organize a website well, limit the number of folders used.

1) Descriptive — and Simple — URLs

Keep it simple, Stupid. Okay, you know I had to say it. That said, you don’t want your URLs so short and un-descriptive that no one knows what the page is all about. Enter Exhibit A: mysite.com/page1.php.

What?

Yeah, definitely don’t do that. You want your URLs to tell people what’s on the page, but you also don’t want them so long your readers have to take a mental breath while reading them.

So use descriptive text — i.e., keywords — but there’s no need to write a sentence for URL structure — people are okay reading “shorthand,” as it were.

Exhibit B: this blog post’s URL is thinksem.com/blog/5-steps-to-create-best-wordpress-urls/, even though the title of the post is “WordPress URLs: 5 Simple Steps to Creating the Best URL Structure.” I don’t need to put every single word into my URL; people can fill in the blanks.

See? Descriptive, simple, easy to read.

2) Short URLs are Best

Brevity is a virtue, folks (this coming from ME, by the way). What we don’t want to see are URLs like this:

longest-url-in-the-worldWhy? Well, because holy HANNAH is that thing long and virtually unreadable. Of course, that URL was created just to prove a point, but still. Yowzas.

Going back to Rand’s scale of URL readability mentioned above, you definitely want people to be able to a) quickly read and b) understand your URL — after all, on a SERP you only have so much real estate to entice readers to click on your web page vs. someone else’s.

So avoid writing a novella — especially if you’re writing lengthy URLs in order to jam in as many keywords as possible.

3) Use Hyphens, not Underscores…and Definitely not Spaces

The aforementioned uber-crazy URL isn’t just made up of a plethora of words, it’s all run together, making it extremely hard to read. They could at least have used hyphens to break up the run-on sentence. Just for S&G I’ll show you what I mean. What if it read like THIS instead?

http://thelongestlistofthelongeststuffatthelongestdomainnameatlonglast.com/we-are-just-doing-this-to-be-stupid-now-since-this-can-go-on-forever-and-ever-and-ever-but-it-still-looks-kinda-neat-in-the-browser-even-though-its-a-big-waste-of-time-and-energy-and-has-no-real-point-but-we-had-to-do-it-anyways.html

See? Much easier to read, amirite? But still obnoxiously long.

Of course URLs need to be easily readable — and short, as I pointed out already — but you can’t just type as if you were writing a sentence, either. Many people choose to separate the words in their URLs with hyphens (dashes) or underscores.

Hyphens read the best — that’s what we recommend. While underscores are perfectly acceptable — and recognized by search engines, etc. — it’s the readers of your content that can get confused. See, when you use underscores for separators in a URL, it used to be that the “dashes” were hidden when in link form, so it appeared to readers as if the URL was written with spaces:

  • mysite.com/this_url_uses_underscores
  • mysite.com/this_url_uses_underscores

Of course, that’s not as much of a concern anymore, but…

…it would (still) seem that — according to Matt Cutts — hyphens and underscores are treated differently by Google:

In essence,

  • underscore = joins words together (underscores are “erased” by Google to jam an entire phrase into one word)
  • hyphen = separates words (Google sees each word separately)

But, it’s better to choose hyphens OR underscores to the use of spaces.

Avoid the use of spaces in place of hyphens within URLs, because that method will turn your URLs into uglies:

thinksem.com/blog/5%20steps%20to%20create%20best%20wordpress%20urls/

As webmaster trends analyst John Mueller at Google tells us,

“I generally recommend avoiding special characters like commas, semicolons, colons, spaces, quotes etc. in URLs, to help keep things simple.”

He forgot the “stupid,” but you get the gist.

4) Don’t capitalize words in URLs

(Or in domains at all, for that matter.) Everyone knows you don’t want duplicate content on the web. One URL per each piece of content, please.

Well, if you capitalize your URLs, you could end up with dupe content, or — depending on how your server is set up — a 404 error page. Why’s that?

Because search engines, bots, HTML5, whatever don’t care about capitalization. They’ll render the same content regardless of whether or not you type in a URL exactly as it’s capitalized. Well, unless your server is set up such that it won’t; in that case you’ll get a 404 unless you DO type in the URL exactly correctly.

What do I mean? People might think mysite.com/About-Our-Company/ looks more formal, but the truth is, no one cares and it can come back to bite you you-know-where. Here are the possible dupes for that (hypothetical) URL:

  • mysite.com/About-our-company/
  • mysite.com/about-Our-company/
  • mysite.com/about-our-Company/
  • mysite.com/about-our-companY/
  • etc.

Also, if you all-caps a word in the URL, same thing happens. So, don’t worry about capitalization in URL structure; just worry about it in your content’s sentence structure.

Another reason not to do this: if your content comes up regardless of capitalization/all caps in the URLs, and people start linking to your content with different variations, you’ll spread your link love over your “duplicate” content — all created because of a few capitalized letters.

5) Limit the Use of Folders in URLs

The use of folders is more about the architecture of your site than creating single URLs, but it’s still an important aspect of WordPress permalinks. While you can certainly build all your website’s URLs off the root (no folders), I don’t recommend it.

So we use folders to organize web content — which, again, helps both search engines AND users alike.

And don’t create multiple folders just for the sake of keyword-stuffing your URLs. Exhibit C: mysite.com/our-widgets/best-widgets/buy-widgets/sale-widgets/best-widget-in-widget-world

Don’t do that. If your URLs look like that, it’s because you

a) are trying to keyword stuff as much as possible, or

b) you need to revise your website’s sitemap.

If it’s the former, stop it. Don’t do it — it’s spammy to people and search engines. If the latter, however, that’s not quite as simple of a fix, though it is doable.

Technically speaking your site’s folder structure needs to stem from the sitemap and organization of content; which is Step 1 of building (or redesigning) a website.

To Wrap It Up…

So. What’d we learn? Not only do you want to write custom URLs in WordPress; you want to write GOOD URLs.

But first, you have to choose “Custom Structure” in the WordPress permalink settings section. After that, you need to adhere to a few simple best practices to create the best URLs for users AND search engines:

  • Use keywords to describe the page, but keep the URL simple
  • Create URLs as short as they can be to (accurately) depict page content
  • Separate words within the URL by using hyphens
  • Only write URLs in lowercase
  • Limit the number of folders in URL structure

The goal of good custom URLs is achievable. You just need to follow the steps!


  • Jaden Madison

    Thanks!
    Can you tell me how Google treats quotes? If an URL contains name of a product is it good to write this name in URL using quotes?

    • Hey, Jaden! I’d say stay away from ANY “special characters” in URLS — like John Mueller says, avoid them to keep things simple (just in case).

      Hope that helps!

Join Our Monthly Newsletter

Filled with industry news, tips, and upcoming events!


Recent Posts

Categories

Archives