Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Trailing-slash or uppercase URL 404 error: how to find and fix it

OPS-018Low impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

A URL variant 404 happens when the same page answers at one address but returns "Not Found" at a near-identical one. The two common cases are the trailing slash (/pricing versus /pricing/) and letter case (/Pricing versus /pricing).

Domain names are not case-sensitive, but the path after the domain often is. Linux servers such as Apache and Nginx usually treat /Landing and /landing as different files. Whether the slash matters depends on the server, the CMS and the rewrite rules.

Typical behaviour by platform (can vary with settings, themes and plugins)
PlatformSlash variantCase variant
WordPressUsually redirects to the permalink formatOften redirects or resolves, depending on setup
ShopifyUsually handled for youUsually handled for you
Webflow, Wix, SquarespaceUsually handled, but check custom pathsCheck each one
Static files on Apache or NginxCan 404 or loopOften 404 on Linux
Custom apps and routersDepends on the route definitionsOften case-sensitive

Why it costs you leads or sales

The impact is usually low and patchy, because most links point at the working version. But the damage lands on paid and tracked traffic: a typo or a tool that adds a slash sends a click you paid for to a dead page.

Common sources of bad variants are ad destination URLs typed by hand, email builders that add or strip slashes, QR codes on print, partner links, and social bios. Each visitor who hits the 404 usually leaves, and the click is still billed.

A click on a slash variant
  1. Ad clickLink uses /offer/ with a slash
  2. ServerOnly /offer is routed, so it returns 404
  3. Landing pageNever shown
  4. Form or checkoutNever reached

The landing page exists, but the variant in the link does not resolve.

Clicks reaching the page by link variantExample numbers
Clicks reaching the page by link variant (example)/offer (works): 700 clicks; /offer/ (404): 200 clicks; /Offer (404): 100 clicks0268537700200100/offer (works)/offer/ (404)/Offer (404)clicks

Example: 1,000 paid clicks split across three link variants, where only the exact lowercase no-slash URL works.

How to check if your site has it

Test the variants of your key URLs
  1. List your important URLs

    Collect landing pages, thank-you pages and checkout paths from your ad accounts, email tools, QR codes and sitemap.

  2. Try each variant by hand

    Open the URL with a trailing slash added or removed, and with the first letter capitalised. Note any that show a 404.

  3. Check the status code

    Use the command below. You want 200 for the canonical URL and a single 301 to it for variants.

  4. Check the ad destinations themselves

    Open the final URLs in Google Ads, Meta Ads and other platforms and test them exactly as written, including any tracking parameters.

Show status and redirect target for each variantbash
for u in "https://example.com/offer" "https://example.com/offer/" "https://example.com/Offer"; do
  curl -s -o /dev/null -w "%{http_code} %{redirect_url} <- $u\n" "$u"
done

How to fix it

Pick one canonical form for each page (most sites choose lowercase, and either always a slash or never). Then 301-redirect every other form to it, and make sure internal links, the sitemap and ad URLs all use the canonical form.

Redirect URL variants to the canonical one
  1. Set the permalink format

    Go to Settings > Permalinks and pick a structure. WordPress then redirects slash variants of posts and pages to match it.

  2. Check custom post types and plugins

    If a variant still 404s, look at redirect, SEO or landing page plugins. Their rules can override core behaviour.

  3. Add a manual redirect where needed

    Use your redirect plugin or server rules to send the broken variant to the live URL with a 301.

Apache: remove the trailing slash with a 301htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1 [R=301,L]
Nginx: remove the trailing slash with a 301nginx
rewrite ^/(.*)/$ /$1 permanent;
Link variants before and after

Before

  • /offer returns 200
  • /offer/ returns 404
  • /Offer returns 404
  • Ad and email links mix all three

After

  • /offer returns 200
  • /offer/ returns a 301 to /offer
  • /Offer returns a 301 to /offer
  • Ads and emails use the canonical URL

How to confirm it's fixed

Confirmation checks
  • Each variant returns one 301 to the canonical URL, then a 200
  • There is no redirect chain longer than one hop
  • Query strings such as gclid and utm_source survive the redirect
  • The page's canonical tag points to the canonical URL
  • The sitemap lists only the canonical URLs
  • Ad final URLs and email links use the canonical form

How to prevent it happening again

Habits that stop variants breaking
  • Write down the URL convention (lowercase, slash or no slash) and share it with whoever builds ads and emails
  • Paste final URLs from the live address bar, not by retyping
  • Test the slash and case variants after every migration or permalink change
  • Re-test after switching hosts, because Apache, Nginx and CDN rules differ
  • Review the Search Console Pages report for 404s that look like variants of live URLs

How FunnelGuard handles this

FunnelGuard does not check this yet. Checking slash and case variants of your URLs is a possible future check, not something the service does today.

What FunnelGuard does do is run your real customer journeys on a schedule from the EU or the US and check each step. If the page your journey starts from stops loading, a run fails, is re-checked from a second region, and you get one alert with a screenshot and a likely cause. That only covers the URL the journey actually uses, so a variant that appears only in some ads or emails will not be tested unless you build a journey that starts from it.

To watch for this yourself, keep a short list of the exact URLs used in ads, emails and QR codes, and run the curl loop above after each release. Google Search Console's Pages report and a crawler such as Screaming Frog can also surface 404s. A free read-only website audit is available from FunnelGuard, and the Free plan covers 1 site and 2 journeys with daily checks if you want a baseline on your main page.

Questions people ask

Why does my page work without a trailing slash but 404 with one?

Your server or CMS only has a route for one form. Apache, Nginx and many app routers treat /page and /page/ as different paths. Add a 301 redirect from the failing form to the working one, or fix the permalink setting.

Are URLs case-sensitive?

The domain name is not, but the path often is. Linux servers usually treat /Offer and /offer as different files, while Windows servers often do not. Test your own site rather than assuming.

Should I use a trailing slash or not?

Either works, as long as you pick one and redirect the other. Follow what your platform already produces, such as the WordPress permalink format, to avoid redirect loops. Consistency matters more than the choice.

How do I redirect a trailing slash URL to the non-slash version?

On Apache, use a RewriteRule that matches ^(.+)/$ and redirects to /$1 with a 301, excluding real directories. On Nginx, use rewrite ^/(.*)/$ /$1 permanent. On hosted builders, use their 301 redirect settings.

Do trailing slash redirects hurt tracking or ads?

Only if the redirect drops the query string. Test with gclid and utm parameters added, and confirm they are still in the final URL. A clean 301 that keeps them is fine.

How can I find which URL variants return 404?

Test the slash, no-slash and capitalised versions of every ad, email and QR code URL with curl or a browser. Also check Google Search Console's Pages report and run a crawler across the site to spot 404s.

Does FunnelGuard detect trailing-slash or case 404s?

No, not yet. It is a possible future check. FunnelGuard does run your real journeys on a schedule and alerts you if a step fails, but it only tests the URLs those journeys use.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.