How to Fix “Pages have underscores in the URL” from Semrush Audit

Category:

Table of Contents

When conducting an SEO audit using tools like SEMrush, you might encounter an issue labeled “Pages have underscores in the URL.” This means that some of your website’s URLs contain underscores (_) instead of hyphens (-). While underscores are technically valid in URLs, using hyphens is the recommended best practice. This is because search engines, particularly Google, treat hyphens as word separators, making it easier to understand the content of the URLUnderscores, on the other hand, are not treated as word separators and can potentially hinder the search engine’s ability to properly index and rank your pages.

How to Fix “Pages have underscores in the URL” Detected by a SEMrush Audit

Fixing URLs that contain underscores is important for several reasons:

  • Improved SEO: Hyphens make URLs more readable to search engines, which can lead to better indexing and higher rankings.
  • User Experience: Hyphens are more user-friendly as they are easier to read and interpret.
  • Consistency: Following best practices for URL structure ensures consistency across your site, which can positively impact both users and search engines.

 

How to Fix “Pages have underscores in the URL” Detected by a SEMrush Audit

How to Fix “Pages have underscores in the URL” Detected by a SEMrush Audit

Identify Affected URLs

  • Log in to your SEMrush account.
  • Navigate to the Site Audit section.
  • Select the project for the website you are auditing.
  • In the audit results, locate the issue titled “Pages have underscores in the URL.”
  • Export the list of affected URLs for easy reference.

Plan URL Changes

  • Review the list of URLs and identify the new URL structure using hyphens instead of underscores.
  • Ensure the new URLs are clear, concise, and accurately reflect the page content.

Implement URL Changes

  • CMS-Based Websites: If your website is managed through a Content Management System (CMS) like WordPress, Joomla, or Drupal:
  • Go to the page settings where the URL can be edited.
  • Change the URL slug to use hyphens instead of underscores.
  • Save and update the page.
  • Static Websites: If your site consists of static HTML pages:
  • Rename the HTML files to use hyphens in place of underscores.
  • Update any internal links within your site to point to the new URLs.

Set Up 301 Redirects

  • To ensure that visitors and search engines are redirected from the old URLs (with underscores) to the new URLs (with hyphens), set up 301 redirects.
  • If using a CMS, plugins like Redirection for WordPress can simplify this process.
  • For static sites or custom setups, add 301 redirects in your .htaccess file (for Apache servers) or your nginx.conf file (for NGINX servers).

Update External Links

  • Reach out to webmasters of external sites that link to your pages with underscores in the URL and request them to update their links to the new URLs.
  • Update any social media, email marketing, or other off-site links under your control.

Resubmit Sitemap

  • Ensure your XML sitemap reflects the updated URLs.
  • Resubmit the sitemap to Google Search Console and Bing Webmaster Tools to help search engines quickly find and index the updated URLs.

Monitor Changes

  • After making these changes, monitor your site’s traffic and search rankings to ensure there are no negative impacts.
  • Use SEMrush and other SEO tools to re-crawl your site and confirm that the issue has been resolved.

 


 

By following these steps, you can ensure that your URLs adhere to best practices, enhancing both your SEO performance and user experience. If the above solutions don’t resolve your issue, contact our team for further assistance. We’re here to help!

Share a post

Request a
free website audit

What to read next