Skip to content
FunnelGuard

Fix guide by FunnelsGuard

URLs with IDs or random strings: how to find and fix them

SEO-122Low impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

A URL is the web address of a page. A clean URL is short and describes the page, like /pricing or /blog/how-to-fix-404-errors. An unclean URL has one or more of these traits:

Common unclean URL patterns and a cleaner version
PatternExampleCleaner version
Numeric ID in a query string/index.php?id=48213/services/plumbing
Random string/landing/x7Kq9aZ2mP/landing/free-quote
Post ID permalinks/?p=123/blog/page-title
Very long path/category/sub/sub2/sub3/2021/05/12/the-complete-guide-to-everything-about-boilers/guides/boiler-guide
Session or tracking junk in the path/shop;jsessionid=9F2A1/shop

Why it costs you leads or sales

What ugly URLs can cost you
  • Lower trust: people hesitate to click or share a link that looks random or suspicious.
  • Weaker context: words in a URL give search engines and AI assistants a small hint about the page topic.
  • Duplicate pages: the same content reachable at several ID or parameter versions can split signals between them.
  • Messy reporting: analytics shows /p?id=48213 instead of a page name, so you misread which pages convert.
  • Truncated links: very long URLs can break when pasted into emails, chats or print.
Click-through by link styleExample numbers
Click-through by link style (example)Random string URL: 2.1 % of people who click; ID in query string: 2.6 % of people who click; Readable slug: 3.4 % of people who click0132.12.63.4Random string URLID in query stringReadable slug% of people who click

Example: illustrative numbers only, showing how readable links could earn more clicks when shared.

How to check if your site has it

Find unclean URLs
  1. List your indexed URLs

    In Google Search Console, open Pages and look at indexed URLs, or search Google for site:yourdomain.com and scan the addresses.

  2. Crawl the site

    Run a crawler such as Screaming Frog (free up to 500 URLs) and export the Address column.

  3. Filter for warning signs

    In the export, filter for ?, =, id, long strings of letters and digits, and URLs over about 100 characters or more than four folders deep.

  4. Rank them by importance

    Mark which ones are money pages (services, products, landing pages) or get traffic. Fix those first and ignore filter or internal search URLs.

How to fix it

Change the URL by platform
  1. Set a readable permalink structure

    Go to Settings > Permalinks and choose Post name. Avoid Plain, which gives /?p=123. WordPress redirects old post-ID URLs to the new ones automatically in most cases.

  2. Edit single page slugs

    Open the page, click the URL field in the sidebar and shorten the slug. WordPress redirects the old slug for posts, but add a redirect with a plugin such as Redirection to be sure.

Apache: 301 redirect an old ID URL to a clean onehtaccess
RewriteEngine On
RewriteCond %{QUERY_STRING} ^id=48213$
RewriteRule ^index\.php$ /services/plumbing? [R=301,L]
Safe order of work
  1. Choose a simple pattern

    Use lowercase words separated by hyphens, 3 to 5 words, and a hierarchy only as deep as it needs to be.

  2. Make a redirect map

    Write a spreadsheet with old URL and new URL for every page you change.

  3. Update internal links

    Change menus, buttons, sitemaps and canonical tags to point to the new URLs so they don't rely on redirects.

  4. Update ads and emails

    Point ad final URLs and email links to the new address, keeping your UTM parameters intact.

  5. Submit the sitemap

    Resubmit your XML sitemap in Google Search Console.

Before and after

Before

  • /index.php?id=48213&cat=7
  • No hint of the topic in the address
  • Old and new versions both live

After

  • /services/plumbing
  • Readable and easy to share
  • Old URL 301 redirects to the new one

How to confirm it's fixed

Post-change checks
  • Open each old URL: it should land on the new URL with a single 301 hop, not a chain.
  • Check the new URL returns 200 and has a canonical tag pointing to itself.
  • Run a crawl again and confirm no internal links still point to old URLs.
  • Check the sitemap lists only the new URLs.
  • In Search Console, use URL Inspection on a new URL and request indexing.
  • Open a landing page with ?utm_source=test added and confirm the parameter survives the redirect.

How to prevent it happening again

Keep URLs clean
  • Set the permalink or slug format once in your CMS and don't leave it on Plain or default IDs.
  • Write the slug by hand when you publish a page, and keep it short.
  • Add a URL rule to your publishing checklist: lowercase, hyphens, no IDs, no dates unless needed.
  • Avoid changing live URLs without a redirect map.
  • Re-crawl the site every quarter and filter for long or parameter-based addresses.

How FunnelGuard handles this

How a URL change can go wrong
  1. Day 0

    You rename /p?id=48213 to /services/plumbing with no redirect.

  2. Day 1

    Old links from ads, emails and other sites land on a 404 page.

  3. Day 7

    You add a 301 from the old URL to the new one.

  4. Week 4

    Search results show the new URL and links work again.

Questions people ask

Do URLs with IDs hurt SEO?

Not directly in most cases. Google can crawl and index them. But readable URLs are easier to trust, share and understand, and ID versions can create duplicates, so clean slugs are better for important pages.

How long should a URL be?

There is no fixed limit, but aim for short and readable, roughly 3 to 5 words in the slug and a few folders at most. Very long URLs are harder to share and often signal a messy site structure.

Should I change my URLs if the site already ranks?

Only if the benefit is clear. Changing URLs is a risk even with 301 redirects, so for pages that rank well and have no real problem, it can be safer to leave them alone and apply clean URLs to new pages.

How do I change from /?p=123 to a readable URL in WordPress?

Go to Settings > Permalinks and choose Post name, then save. WordPress usually redirects old ID links to the new URLs, but test a few old links to confirm.

Do I need a 301 redirect when I change a URL?

Yes. A 301 tells browsers and search engines the page has moved permanently, so visitors and link value reach the new address instead of a 404 page.

Are URL parameters like ?utm_source bad?

No. Tracking parameters are normal and are not the problem. The issue is when the main address of an important page depends on an ID or random string instead of a readable slug.

Does FunnelGuard check for ugly URLs?

No. FunnelGuard does not check URL structure yet. It does run your real customer journeys and tracking checks, which can reveal a broken page or lost parameters after a URL change.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

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.