Skip to Content
OpportunitiesTechnicalIssue ReferenceURLDouble slash in the URL path

Double slash in the URL path

What it is

The path of the page’s URL has two or more slashes in a row, as in /blog//pricing-guide or /pricing//. The two slashes after https: are part of the protocol and are fine. A doubled slash in the path is nearly always an accident, typically a template that joins a base address ending in a slash to a path that starts with one.

Why it matters

Many servers answer /blog//pricing-guide with the same content as /blog/pricing-guide, so one page becomes reachable at several addresses. Search engines may crawl each as a separate URL and then have to work out which one to index , and link signals split between them. Other servers answer 404, which breaks every link that uses the doubled form.

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 two or more consecutive slashes anywhere, including a path that is only //, as in https://example.com//. Slashes in the query string and the protocol are not checked. 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 error with medium severity.

How to fix it

  1. Find where the doubled slash comes from. It is usually the sitemap generator, or a template or setting that joins a base URL and a path. Fixing it there corrects every affected URL at once.
  2. List the single-slash URL in your sitemap. A doubled URL left in the sitemap that now redirects is reported as a redirect.
  3. Make the doubled form answer with a 301 to the single-slash URL, and make sure the page’s canonical tag names the single-slash URL.
  4. Update internal links that use the doubled form. Links left pointing at a redirecting address are reported as links to internal redirects.

Example

A site setting stores the base address as https://example.com/, and the template adds /blog/pricing-guide, producing https://example.com//blog/pricing-guide. Storing the base without its trailing slash gives https://example.com/blog/pricing-guide.


← Back to URL

Last updated on