Skip to Content
OpportunitiesTechnicalIssue ReferenceURLUnderscores in the URL path

Underscores in the URL path

What it is

The path of the page’s URL contains an underscore, as in /blog/pricing_guide. Underscores in a slug are usually meant to separate words, which is the job hyphens do in /blog/pricing-guide.

Why it matters

Google recommends  hyphens instead of underscores to separate words in URLs. Readable words in the address help people and search engines see what a page covers before they open it, and a clean address looks more trustworthy when it is shared. Google does not say how much this weighs, and the effect is likely small, so treat this as low-priority cleanup: for an established page, a new URL can cost more than it gains.

How Asky checks it

Asky checks the path of the page’s URL as your sitemap lists it. The page is reported when the path contains at least one underscore. The domain and the query string are not checked, so a parameter such as ?utm_source= does not trigger it. The check runs in every audit, including audits of selected pages, on every page whose HTML Asky fetched; a page answering 4xx or 5xx is reported for its status alone. A URL that redirects to another audited page reports only the redirect.

Reported as an opportunity with low severity.

How to fix it

  1. For new pages, write slugs with hyphens from the start. In Webflow, WordPress and Sanity the slug is its own field on the page or document.
  2. For existing pages, weigh the change: a page with traffic or backlinks can lose visibility for a while after it moves.
  3. If you change it, add a 301 redirect from the old URL to the new one, and list the new URL in your sitemap and canonical tag. An old URL left in the sitemap is reported as a redirect.
  4. Update your internal links to the new URL. Links left on the old address are reported as links to internal redirects.
  5. To leave it as it is: if the page is established and performing, mark the issue resolved.

Example

https://example.com/blog/pricing_guide becomes https://example.com/blog/pricing-guide, with a 301 from the old address and the sitemap and internal links updated to the new one.


← Back to URL

Last updated on