Every page on your website has an address, called a URL. Some look clean, like example.com/apple-varieties/. Others look like a jumble, like example.com/index.php?id=4827&cat=12. Beginners often ask me: "Does my URL affect my SEO, and should I change the messy ones?"
The short answer: clean URLs help people, and they make your site easier for Google to crawl. But changing URLs on an existing site has risks if you do it carelessly. In this lesson, I will explain what makes a URL SEO-friendly, how to plan URLs for new pages, and how to change old URLs safely when you really need to.
This lesson continues the on-page chapter. If you haven't yet, you may want to read the lesson on headings and page structure first, because a page's URL, title and H1 should all tell the same story.
What is a URL, and what are its parts?
URL stands for Uniform Resource Locator. In plain words, it is the web address of one page. Let me break down an invented example:
https://www.example.com/shop/running-shoes/?color=blue#reviews
| Part | In the example | What it means |
|---|---|---|
| Protocol | https:// | How the browser connects. HTTPS means the connection is secure. |
| Domain | www.example.com | Your website's name, the part you buy and own. |
| Path (folders and slug) | /shop/running-shoes/ | Where the page sits on your site. The last part is often called the "slug." |
| Parameters (query string) | ?color=blue | Extra settings after a question mark, often for filters, sorting or tracking. |
| Fragment | #reviews | Jumps to a spot on the same page. Google generally ignores it. |
For SEO, you have the most control over the path, and that is where most of this lesson focuses. The question of HTTPS gets its own lesson later, on HTTPS and website security.
What does Google say about URL structure?
Google has a page called URL structure best practices. Let me sum up the key points in simple words.
Use readable words, not ID numbers
Google recommends descriptive words instead of long ID numbers. Its SEO Starter Guide explains why: people see your URL in search results and in links, and words help them decide whether the page is what they want. A string of random numbers tells them nothing.
Use words your audience uses
Google suggests using the language and words your audience searches with. If your customers say "kurta," your URL should say "kurta," not your internal product code.
Separate words with hyphens
Google recommends hyphens (-) between words, not underscores (_). So /summer-clothing/ is preferred over /summer_clothing/. It also discourages joining words together, like /summerclothing/, because it's harder to read.
Keep parameters few and tidy
Remove parameters that don't change the content. When you do need them, Google recommends the standard format: an equals sign between a key and its value, and an ampersand between parameters, for example ?category=dresses&sort=low-to-high.
Be consistent with capital letters
Google treats /APPLE and /apple as two different URLs. The easy fix is to use lowercase everywhere.
Don't use fragments to change content
If a page shows different content based on what comes after the #, Google may not see it as a separate page. Google advises against using fragments to change the content of a page.
Do keywords in URLs help you rank?
This is where many old SEO tips go wrong. Google's SEO Starter Guide says that keywords in the domain name or URL path have hardly any effect on ranking beyond appearing in breadcrumbs. Breadcrumbs are the small trail of links, like "Home › Shop › Running shoes," that can appear on a page and sometimes in search results.
So why bother with clean words at all? Because:
- People trust readable URLs. A URL that matches what they searched for looks like the right page.
- Clean URLs are easier to share in emails, chats and social posts.
- Readable URLs are easier for you to manage, report on and organize.
- Your main topic word often fits naturally because the page is about that topic, so you get any small benefit without effort.
In brief: use the page's main topic in the URL because it describes the page, not because you expect a ranking jump. Don't buy a keyword-stuffed domain hoping it will rank by itself.
How should you use folders in your URLs?
Folders are the parts between slashes, like /blog/ or /shop/shoes/. They show how your site is organized. A clear folder structure helps people understand where they are, and it can help Google too. The SEO Starter Guide says that on sites with more than a few thousand URLs, grouping similar topics in folders can help Google learn how often each folder changes, so it can crawl them sensibly.
Here is a simple, invented structure for a small fruit shop:
/apples/(category page)/apples/royal-delicious/(product page)/apples/golden-delicious/(product page)/blog/how-to-store-apples/(blog post)
Some practical advice on folders:
- Keep it shallow. Two or three levels are enough for most sites.
/shop/fruit/fresh/apples/red/royal-delicious/is too deep. - Don't put dates in blog URLs unless the content is news. A date makes a post look old, and if you update it later the URL looks out of date.
- Don't rely on folders for SEO tricks. They are for organizing. How you link pages together matters more, which you will learn in the lesson on site architecture.
Good and bad URL examples
Here are some invented examples to make the rules concrete.
| Weak URL | Better URL | What changed |
|---|---|---|
/index.php?p=4827 | /apple-pie-recipe/ | Words instead of an ID number |
/Summer_Dresses/ | /summer-dresses/ | Lowercase and hyphens |
/blog/2019/03/14/how-to-start-a-vegetable-garden-at-home-for-beginners-complete-guide/ | /blog/start-vegetable-garden/ | Shorter, no date, no filler words |
/best-cheap-seo-services-seo-company-seo-agency/ | /seo-services/ | No keyword stuffing |
/shoes/?sessionid=8f3a2c&ref=email | /shoes/ | No session or tracking parameters in links |
/products#red-shoes (content changes by fragment) | /products/red-shoes/ | A real path for a real page |
A related issue is having the same page available at several addresses, like with and without "www" or with and without a slash at the end. Our post on trailing slashes, www and HTTPS explains how to choose one version, and the lesson on duplicate content covers why it matters. Parameters get their own deep dive in our post on URL parameters and SEO.
How to change URLs without losing traffic
Here is my honest advice first: don't change working URLs just to make them prettier. If an old page ranks well and gets traffic, an ugly URL is a small problem. A badly handled URL change can cause a much bigger one. Change URLs when there is a real reason, such as a site redesign, a platform move or URLs that are truly confusing.
When you do change them, follow the steps from Google's guide to site moves with URL changes:
- Make a map. List every old URL and the new URL it will move to, in a simple spreadsheet.
- Set up permanent redirects. A redirect automatically sends visitors and Google from the old address to the new one. Use server-side permanent redirects, such as 301 or 308. Send each old URL straight to its final new URL, not through a chain of redirects.
- Update your internal links. Change the links on your own site so they point to the new URLs directly.
- Update your sitemap. Create an XML sitemap with the new URLs and submit it in Search Console.
- Update canonical tags. Each new page should point to itself as the main version.
- Keep the redirects for a long time. Google advises keeping them as long as possible, generally at least one year.
- Watch the results. Check Search Console and your analytics. Expect some ups and downs while Google recrawls. Google says a medium-sized site may take a few weeks or more to settle.
You will learn redirects, sitemaps and canonical tags properly in the technical SEO chapter, starting with 301 and 302 redirects. For a single page, the steps are the same, just smaller. If you are moving a whole site, read the lesson on site migrations before you start.
Try it: plan clean URLs for your next three pages
This exercise is safe because you are planning new pages, not changing live ones.
- Choose three pages you plan to publish soon, such as a new service, a product and a blog post.
- Write the main topic of each page in two to five words, using the words your customers use.
- Turn each into a slug: lowercase, words separated by hyphens, no dates, no filler like "a," "the" or "complete guide" unless it is needed for meaning.
- Decide the folder each page belongs in, for example
/services/or/blog/, and keep it to two or three levels. - Check your platform's settings. In WordPress, look at Settings › Permalinks and choose "Post name" for new sites. On Shopify, the folders are fixed by the platform, but you can edit each slug under "Search engine listing."
- Look at your existing URLs and simply note any that are truly confusing. Don't change them today. Add them to a list to review with the redirect steps above.
Our blog post on SEO-friendly URL structure has more examples by platform if you want to go further.
Questions beginners ask about SEO-friendly URLs
How long should a URL be?
Google doesn't give a length limit for ranking. Shorter URLs are simply easier to read, share and remember. Aim to describe the page in a few words and stop there.
Should I remove "stop words" like "and" or "the"?
You can, if the URL still makes sense without them. /how-to-store-apples/ reads fine. Don't cut words if the meaning becomes unclear.
Can I use non-English words in my URLs?
Yes. Google suggests using the language of your audience. Non-ASCII characters, like letters with accents or non-Latin scripts, should be percent-encoded in links. Most platforms do this for you automatically.
Will changing a URL hurt my rankings?
It can cause a temporary dip while Google processes the change, and it can cause a lasting loss if you skip the redirect. With a proper 301 redirect, updated internal links and an updated sitemap, most pages recover. Only change URLs when there is a good reason.
What makes a URL work, and where we go next
A good URL is short, readable, lowercase and uses hyphens between words. It describes the page in your customers' words, sits in a sensible folder, and avoids unnecessary parameters. Keywords in URLs have only a small effect on ranking, so clean URLs are mainly about trust, clarity and easy crawling. Change existing URLs only with a plan: map them, redirect them permanently and update your links.
In the next lesson, we connect your pages to each other: internal linking, one of the most powerful on-page tools you control.
If you are planning a redesign or URL change and want it done safely, our team can help. Take a look at our technical SEO guide or get a free quote.