On this page
What this issue is
A URL is the web address of a page. Some URLs separate words with an underscore, like /blue_widgets/, or contain a space, which browsers show as %20, like /blue%20widgets. Spaces are not allowed in URLs, so they must be encoded.
Google's documentation recommends hyphens to separate words in URLs. It says it treats hyphens as word separators and advises against underscores. A URL like /blue-widgets/ is read as two words. /blue_widgets/ may be read as one joined token.
| URL | Status | Why |
|---|---|---|
| /blue-widgets/ | Good | Hyphens clearly separate words |
| /blue_widgets/ | Avoid | Underscores may join words together |
| /blue%20widgets | Avoid | Encoded space, ugly and easy to break |
| /Blue-Widgets/ | Risky | Uppercase can create duplicate versions |
Why it costs you leads or sales
The direct ranking effect is small. The bigger costs are practical. Links with spaces get cut off in emails, chat apps and ads, so the visitor lands on an error page. Long %20 strings look untrustworthy in search results and social previews.
Messy URLs also tend to come with other problems: duplicate versions, inconsistent tracking links and broken redirects. A broken landing page link means paid clicks and referrals are wasted.
- You share link/our services/pricing
- App cuts linkLink ends at the space
- 404 pageVisitor sees an error
- Lead formNever reached
A link with a space is cut off when it is pasted into a message.
How to check if your site has it
Crawl your site
Run a crawler such as Screaming Frog (URL tab, filter for Underscores and Contains Space) or Sitebulb. Both list URLs with these patterns.
Check your XML sitemap
Open /sitemap.xml and search the page for
_and%20.Check Google Search Console
Go to Indexing > Pages and use the search filter on the URL list, or the Performance report with a URL filter containing
_or%20.Check links on key pages
View the source of your menu, footer and landing pages and look for hrefs with underscores or spaces.
How to fix it
Decide first whether a change is worth it. If a URL already ranks and gets traffic, a change carries some risk. New pages should always use hyphens. For existing pages, change them when you can add a clean 301 redirect and update internal links.
Edit the slug
Open the page or post, find Permalink in the sidebar and replace underscores with hyphens. Update.
Add a 301 redirect
WordPress usually redirects old post and page slugs automatically. Check it, or add a rule in a redirect plugin you already use.
Edit the handle
Open the product, page or collection, scroll to Search engine listing preview, click Edit and change the URL handle.
Keep the redirect
Tick Create a URL redirect for the old handle when Shopify offers it, or add one under Content > Menus > View URL Redirects.
Change the slug
Open Page Settings (or the CMS item) and edit the Slug field to use hyphens.
Add the redirect
Go to Project Settings > Hosting > 301 Redirects and map the old path to the new one.
Edit the page URL
Open page Settings > SEO basics and edit the URL slug.
Redirect
Tick the option to create a 301 redirect when prompted, or use the URL Redirect Manager in Marketing & SEO tools.
Edit the URL slug
Open the page settings, go to General and edit the URL Slug.
Add the redirect
Use Settings > Developer Tools > URL Mappings to add
/old_path -> /new-path 301.
Rename the route
Change the route, file name or slug in your code or CMS to use hyphens and lowercase.
Add a 301 redirect
Redirect the old path to the new one at server level, as in the snippets below.
Redirect 301 /blue_widgets/ https://www.example.com/blue-widgets/location = /blue_widgets/ {
return 301 https://www.example.com/blue-widgets/;
}Update internal links
Edit menus, footer, buttons and in-content links to point straight to the new URL, so they don't pass through a redirect.
Update the sitemap and canonical tags
Make sure both show the new hyphenated URL only.
Update ads and email links
Change any ad final URLs, email templates and social bios that use the old address. Keep your UTM parameters intact.
Before
- /Our_Services/Web_Design
- /price list.html
- Links break when pasted into chat
- Case variants can create duplicates
After
- /our-services/web-design/
- /price-list/
- Links paste cleanly everywhere
- Old URLs 301 to the new ones
How to confirm it's fixed
- Old URL returns a 301 to the new hyphenated URL (check with a redirect checker or
curl -I). - New URL returns 200 and loads the right page.
- The new URL is the canonical and appears in the sitemap.
- Internal links point to the new URL, not through the redirect.
- A re-crawl shows no remaining underscore or space URLs.
- In Search Console, inspect the new URL and request indexing.
curl -I https://www.example.com/blue_widgets/
# Expect: HTTP/2 301 and location: https://www.example.com/blue-widgets/How to prevent it happening again
- Write a URL rule: lowercase, hyphens, no spaces, no special characters.
- Check the slug before publishing any new page, product or landing page.
- Brief agencies, freelancers and importers on the rule, especially for bulk CSV uploads.
- Run a scheduled crawl each month and filter for underscores and spaces.
- Keep a redirect list so old URLs are never left dead.
How FunnelGuard handles this
FunnelGuard does not check for underscores or spaces in URLs today. It is a possible future check. FunnelGuard is a synthetic monitoring service: a robot visitor runs your real customer journeys, such as lead forms and checkouts, on a schedule and checks each step.
What it does catch nearby is a journey that breaks because a link no longer works. If a renamed URL leads to an error page partway through a monitored journey, the failed step is re-checked from a second region and you get one alert with a screenshot and a likely cause. That only covers the pages your journeys visit, not your whole site.
To watch for this issue itself, schedule a monthly crawl with Screaming Frog or Sitebulb, and check your sitemap and Search Console URL lists. A free read-only website audit is also available from FunnelGuard, and the Free plan covers 1 site and 2 journeys with daily checks, no card needed.
Questions people ask
Are underscores in URLs bad for SEO?
The direct ranking effect is small, but Google recommends hyphens to separate words and advises against underscores. Hyphens are read as word breaks, while underscores may join words into one token. For new pages, use hyphens.
Should I use hyphens or underscores in URLs?
Use hyphens. Google's guidance treats them as word separators, and they are the common standard for readable URLs. Keep everything lowercase for consistency.
Why does my URL show %20?
%20 is the encoded form of a space. URLs cannot contain a literal space, so the browser converts it. It usually means the page name, file name or slug contained a space and should be changed to a hyphen.
How do I change underscores to hyphens in my URLs?
Edit the page slug in your CMS (permalink, handle or URL slug field) and replace underscores with hyphens. Then add a 301 redirect from the old URL to the new one, and update internal links, the sitemap and any ads.
Will changing my URLs hurt my rankings?
A properly redirected change usually has limited impact, but there is always some risk. Use a 301 redirect for every changed URL, update internal links and change pages in small batches. If a page ranks well and the gain is small, you may choose to leave it.
Do underscores in UTM parameters or image file names matter?
No. Underscores in query parameters like utm_source and in file names for images or scripts are normal. This issue concerns the path of page URLs.
How do I find all URLs with spaces or underscores on my site?
Crawl the site with a tool such as Screaming Frog or Sitebulb and filter the URL list for underscores and spaces. You can also search your XML sitemap and Search Console page lists for _ and %20.
Does FunnelGuard check for underscores or spaces in URLs?
Not yet. It is a possible future check. FunnelGuard does monitor your customer journeys, so a renamed URL that breaks a monitored journey would show up as a failed step.
Related issues
- SEO-121Flat or chaotic URL structure with no topical hierarchyFix guide
- SEO-122URLs with IDs, random strings or very long pathsFix guide
- SEO-123Non-ASCII or encoded characters in URLs breaking linksFix guide
- SEO-127Internal links to noindex or canonicalised pagesFix guide
- SEO-114Orphan money pages with no internal linksFix guide
- SEO-115Money pages more than 3-4 clicks from the home pageFix guide