The URL structure is the way information is organized on your site. It’s critical so people can find your content, and search engines can find and organize it appropriately.
Many times the URL structure is completely taken for granted until that moment that you launch your new website and find yourself wondering why your search rank started plummeting. People that had been linking to your content for years suddenly are removing links because they just lead to a 404 page now. Maybe hundreds or thousands of people around the world have bookmarked that article or how-to and now it’s just gone.
Your URL is your buddy
Although using fancy acronyms makes it sound like it’s reserved for the nerds developing your site, URLs are actually not for nerds, they’re for users. Instead of memorizing a series of numbers like 22.214.171.124, you can simply go to indevver.com and find this really great website! But just in case you’re into the nerdy stuff, URL stands for Uniform Resource Locator, and it generally points to a file or database query on a server somewhere. There are two parts to a url, there’s the protocol (before the colon) and the resource name (after the colon). The resource name, or domain name, is a critical part of your company and its marketing, teaching, informing, selling or whatever you’re doing with your website. So the structure that’s attached to it is equally important.
Back to URL Structure
So if the URL points to an element on your website, the URL structure is the way of organizing those elements. A website might have pages, blog posts, events, blog archive pages, profile pages, product listings, articles and many other parts and pieces that make up your complete website. The URL structure is the roadmap that allows access the different types of content on your site. The table below shows some examples of different elements that a url might point to and what the URL might look like.
URL Structure for Different site elements
When is a page not a page?
In the table above I’ve outlined a few examples of the different elements that a URL might point to. Although in conversation we may refer to them all as web pages, it’s helpful in this discussion to differentiate between them. WordPress’s roots are in blogging, so it refers to every element as a type of post. The OG post type is called posts (makes sense, right?). Additional post types that ship with WordPress are pages and attachments (files in the media library). WordPress also supports extending these with additional Custom Post Types that can all have different attributes and functionality that make them unique, and impact how we connect to them in our site.
A page has a pretty logical structure. The title of the page is represented in the url, and the parent/child (or hierarchical) relationship is fairly straight forward. In fact, if you were thinking in terms of files and folders this might be a good way to organize a series of documents.
This hierarchy works well for pages because they are static. That is to say, they stay put. Possibly for the entire lifecycle of the website. They can contain dynamic elements, and can be edited and changed as needed, but the nature of a page is that it sticks around. This is illustrated by the fact that pages are likely to make up most of the links in your navigation bar.
This is all seems like it’s working until we introduce some complexity. In our example, you see a clear structure where team is in about, and sally-b is in team. But say the team grows, and within team there is now a department. Sure, you could start adding department folders under the team folder and move people into departments, but there’s always that one position in the organization that messes is up. What if they don’t have a department? What if they work in two departments? We might need to have a URL structure that addresses this.
The biggest difference between posts and pages are that pages are organized by hierarchy, and posts are organized by date. On an active blog or news site, posts will be constantly changing. Typically they’re ordered by date in a descending order so you see the newest post first. Another way that posts are organized is by category and tag. This means that a given blog post might be found in a number of different places on the site. It might be a part of the main blog index, as well as one or more categories or tags, and finally, since they’re organized by date, you may find the same post in a date archive. In WordPress, a date archive URL contains the year and month like this:
Events have some similarities with posts in that they’re organized by date, and can be organized within categories. However, posts are ordered by the date published, and events will most likely be organized by the date in which the event occurs. While the published and modified dates are built in to WordPress, event dates are not and that functionality is added as a plugin or custom post meta field that is unique to the Event post type. Because it’s a custom post type with additional custom fields, the URL can be customized to the site requirements.
A product can be very complex depending on the type and number of products. A product can have one or more categories, and sub categories. A product can also have variations like size and color. A product also has some unique attributes like a description, image, title and price, and maybe some weight and dimensions. These can all have a significant impact on the URL structure. Say you’ve picked out a t-shirt that you want for your birthday. You want the yellow one in XL and you’d like to send that link to your friend so they know what to get you. You’ve got to have a URL structure that supports that, and by the way, the most popular e-commerce package for WordPress, WooCommerce, does not have that capability out of the box.
When does this matter?
Once you’re site is set up and going, you’re probably not putting much thought into the URL structure. When you create the page, “Company Timeline” as a child of the “About” page, that’s how it will show up in your url, and that’s good enough. Here are some key points where you’ll want to pay attention to the url structure, so you don’t get stuck, or find yourself having to change the URL structure after you have something established.
- When you’re planning a new site
- When you’re replacing an existing site
- When you’re adding new or custom element to an existing site
- When you’re changing the structure of your existing site
Things to keep in mind
If you’re changing your structure you’ll need to consider creating redirects so people can find the content in its new location. There are a couple of ways to handle that in WordPress, but the simplest is with plugins. Here are three that I recommend.
This redirects to only white-listed domains, is very simple, and is written by the brilliant developers at 10up.
It’s been around forever and is rock solid.
There’s a decent chance you have the Yoast SEO plugin on your site anyway. The Premium version handles redirects, and even automatically prompts you to add redirects when you move elements around on your site.
Related to your URL structure is your site map, specifically the sitemap.xml. Search engines use this to attempt to understand not only where pages are on your site, but what they mean, and how important they are. The article focused on how URLs organize our content for the sake of our human audience, but we have a robot audience that pay attention to this structure as well, and the sitemap.xml file is one way to inform the search engine crawlers about your site.
This article has focused on structure, but the content of your URL is important to, both for readability by humans, and search engines alike. Thankfully, WordPress is really smart about helping take the title of your element, stripping out stop words like a, and, the, and by and replacing spaces with dashes. Your title automatically becomes a readable URL without a lot of fuss.
Have you ever be caught assuming that your URL would be a certain way? Have you ever launched a beautiful new site, only to find traffic instantly drop off? Share your experience in the comments below. I’d love to hear about it.