Preferences

Privacy is important to us, so you have the option of disabling certain types of storage that may not be necessary for the basic functioning of the website. Blocking categories may impact your experience on the website. More information (Cookie Policy)

URL: Anatomy and SEO Best Practices for Search and AI in 2027

A URL is a web address that locates a page. Learn the parts of a URL and the structure best practices that help SEO and AI search.

Sorank customerSorank customerThomas Girauc, Sorank customerCelio Fabiano, Sorank customerSorank customerXavier Breull, Sorank customer
+ 9'000 Subscribers
URL: Anatomy and SEO Best Practices for Search and AI in 2027
Notification: your site reached 20K clicks from Google Search in 28 days

Tools

On this page

Summary

A URL, short for Uniform Resource Locator, is the unique web address that points to a specific page or resource, and its structure affects how easily users, search engines, and AI systems can find, understand, and trust that page.

Want to go further? Ask

A URL, which stands for Uniform Resource Locator, is the address of a resource on the web. It tells a browser exactly where to find a page, image, or file and which protocol to use to retrieve it. Every page you visit has a URL, and while it looks like a simple string, it is built from several distinct parts that each serve a purpose.

URLs matter for more than navigation. A clean, logical URL structure helps search engines crawl and index a site, helps users understand where they are, and increasingly helps AI systems interpret and cite pages. For anyone working in SEO or generative engine optimization, understanding how URLs are built and how to structure them well is a foundational skill.

What is a URL?

A URL is the unique locator for a resource on the internet, the equivalent of a street address for a specific page. When you type a URL or click a link, your browser uses it to request the exact resource it points to from the right server. Without URLs, there would be no reliable way to find a particular page among the billions on the web.

It helps to see the URL as part of a larger system. The address identifies a single resource, and the way addresses are organized across a site forms its architecture. Good URLs reflect that architecture clearly, which is why they connect closely to crawling and indexing, the processes by which search engines discover and store pages.

The anatomy of a URL

A full URL is made up of several components. The scheme or protocol, usually HTTPS, tells the server which connection method to use and, in the case of HTTPS, encrypts the exchange. The subdomain, such as www or blog, points to a section of the site, the second-level domain is the site's name, and the top-level domain is the extension like .com or .org.

After the domain comes the path, which locates the specific resource through a folder-like structure such as /women/shoes/running. A URL can also include a query, introduced by a question mark, with parameters expressed as key-value pairs joined by ampersands, plus an optional port and a fragment marked by a hash that jumps to a section of the page. Knowing these parts makes it easier to diagnose problems and structure addresses well, including the choice of a canonical URL when several addresses serve similar content.

Relative URL vs absolute URL: how each one resolves and when to use it

A relative URL is an address that leaves out some of its parts, usually the scheme and the domain, such as /pricing or ../guide. The browser or crawler completes it from the address of the page that contains it. Relative URLs work well for internal links, but canonical tags, hreflang annotations, and sitemaps should always use absolute URLs.

How each form resolves

Every example below sits on a page at https://www.example.com/blog/seo/.

FormWritten asResolves to
Root-relative/pricinghttps://www.example.com/pricing
Document-relativeguidehttps://www.example.com/blog/seo/guide
Parent folder../toolshttps://www.example.com/blog/tools
Protocol-relative//cdn.example.com/app.jshttps://cdn.example.com/app.js
Query only?page=2https://www.example.com/blog/seo/?page=2

Root-relative links are the safest choice for internal linking. They always start from the domain, so they keep working when a page moves to another folder or the whole site moves to a new domain.

Where relative URLs cause problems

  • Canonical tags. Google supports relative paths in rel="canonical" but asks for absolute ones, because relative paths “can cause problems in the long run” (Google, duplicate URL guidance). If a staging copy of your site gets crawled, a relative canonical points to the staging domain instead of your live page.
  • Hreflang. Google requires alternate URLs to be fully qualified, protocol included, so /fr/ and //example.com/fr/ are both invalid (Google, localized versions guide). Details in our hreflang guide.
  • Sitemaps. Each entry in an XML sitemap must be a full URL that starts with the protocol.
  • Document-relative links. The same guide link resolves to /blog/guide on /blog/seo, without the final slash, because the browser drops everything after the last slash. A page/3 link placed on /blog/page/2/ becomes /blog/page/2/page/3, and crawlers keep following ever-longer paths if your server answers them.

Check the base tag

A <base> element in the head changes the starting point of every relative URL on the page. One wrong value breaks all of them at once, so check it first whenever links land in unexpected folders.

<!-- Document-relative links on this page now resolve from /en/ -->
<base href="https://www.example.com/en/">

Tip

Crawl your site and filter for internal links that return a 404 or contain a repeated folder, such as /page/2/page/3. Both usually come from a document-relative link in a template. Rewrite that link as root-relative, and every page built from the template is fixed at once.

Why URL structure matters for SEO

Search engines read URLs as a signal. A descriptive URL that names the page topic helps a crawler understand what the page is about before parsing the content, and a logical hierarchy communicates how pages relate to one another. URLs that reflect a clear structure, such as a category followed by a subcategory, make a site easier for both users and bots to navigate.

There is also a user-experience effect. Short, readable URLs are easier to understand and can improve click-through rates in search results, because people trust a clean address more than a cryptic one. This is why URL structure is a standard checkpoint in any technical SEO audit, alongside the use of meta tags.

URL best practices

Several rules consistently help. Keep URLs short and clear, use readable words rather than long ID numbers, and separate words with hyphens rather than underscores, which Google explicitly recommends so users and search engines can identify concepts. Use lowercase letters throughout to avoid duplicate-URL issues, and include a relevant keyword once without repeating it.

Structure for longevity, too. Avoid putting dates in URLs so you do not have to change them later and risk losing their value, and design a logical hierarchy that will still make sense as the site grows. For international sites, Google suggests country-specific domains or subdirectories and localizing the words in the path to match the audience's language. These choices pair naturally with disciplined keyword research and content planning.

HTTPS, parameters, and common mistakes

HTTPS is the default expectation on the modern web, both for security and for the small ranking benefit it carries, so HTTP URLs should redirect to their HTTPS versions. Beyond that, the most common problems involve parameters. Overly complex URLs with many parameters can confuse crawlers, create duplicate content, and waste crawl budget.

Google specifically warns against embedding session IDs in URLs, recommending cookies instead, and against using fragments to change page content, since search generally does not support that. Dynamically generated pages without limits, like an open-ended calendar, can spawn near-infinite URLs that drain crawl resources. Avoiding these traps keeps a site efficient to crawl and clean to index.

URL parameters and SEO: when to keep them and when to block them

URL parameters hurt SEO only when they create several addresses for the same content. Keep a parameter when it changes the content in a way people search for, such as a product variant. For sorting, tracking, and session values, point a canonical tag at the main URL so search engines index one version.

Which parameters to keep

Not every parameter is a problem. Ask whether it changes what the page is about. A size or color that people search for can earn its own indexable page. A sort order or a tracking tag does not, and it only multiplies the same content.

Parameter typeExampleWhat to do
Changes the content?color=redKeep it indexable and give it a unique title
Sorts or filters the same content?sort=priceCanonical to the main URL
Tracks a campaign?utm_source=newsletterCanonical to the clean URL, and never link to the tagged version
Stores a session?sessionid=8f3aMove it to a cookie and keep it out of the index

How to handle the duplicates

  • Link internally to the clean URL. Google asks you to link to the canonical URL rather than a duplicate, which shows your preference.
  • Add a canonical tag to each parameter page that points to the preferred URL.
  • Use a permanent redirect only when you retire a duplicate page for good.
  • Use robots.txt to limit crawling of endless combinations, not to fix duplicates. A blocked page cannot pass its canonical tag to Google.

Google's full guidance on duplicate URLs is in its Search Central documentation. A canonical tag on a parameter page looks like this:

<link rel="canonical" href="https://www.example.com/">

Place it in the head of /shoes/running?sort=price, and the sorted version stops competing with the main page.

Mistakes that waste crawl budget

  • Letting every filter combination generate a crawlable link.
  • Pointing canonicals at a page with different content.
  • Linking to parameter versions from your menus or your sitemap.
  • Using the URL removal tool for duplicates, since it hides all versions of a URL from Search.

Google retired its URL Parameters tool in 2022. It now relies on your canonical tags, internal links, and crawl rules to decide which parameters matter, so those signals do the work. For large filter systems, read our guide to faceted navigation SEO.

Tip

Crawl your site once and export every URL that contains a question mark. If one page has dozens of versions, fix the internal links that create them before you touch the tags.

Why URLs matter for AI search and GEO

The same qualities that help search engines help AI systems. A clean, crawlable URL lets AI crawlers reach a page, and a descriptive path gives an AI assistant an early signal about the page's topic. When content is clear and addressable, it is easier for these systems to fetch, understand, and use.

Citations add another dimension. When an AI assistant references your page, the URL is the link it displays, and a readable address looks more credible than a string of random characters. A tidy URL therefore supports both discovery and trust in AI answers, which is why it belongs in any modern AI content strategy aimed at being cited.

URLs and site architecture

URLs are the visible expression of how a site is organized. Aligning the URL path with the topic hierarchy, so a page lives at a logical location, reinforces the relationships between pages and helps distribute authority through internal links. A coherent URL structure and a coherent site architecture go hand in hand.

This is why planning URLs early pays off. Deciding on a clean, scalable pattern before publishing avoids messy migrations later, when changing a URL can break links and lose accumulated value. Treating URL structure as part of architecture, rather than an afterthought, keeps a growing site navigable for users, search engines, and AI alike.

Conclusion

A URL is the Uniform Resource Locator that addresses a specific resource on the web, built from a scheme, domain, path, and optional parameters and fragment. Its structure matters because clean, descriptive, logically organized URLs help search engines crawl and understand pages, improve user trust and click-through, and give AI systems clear signals about content.

The best practices are stable: keep URLs short and readable, use hyphens and lowercase, default to HTTPS, avoid parameter sprawl, and plan for longevity. Treat URL structure as part of your site architecture and your broader AI content strategy, and use Sorank's research and content planning tools to map a structure that scales. Reference sources: Google Search Central and HubSpot.

Dynamic URLs: what they are and when to rewrite them

A dynamic URL is an address where the server builds the page on request, usually from a script and a database query. It shows that with a question mark, a numeric ID, or a script name such as .php, for example /product.php?id=482. A static-looking URL names the content instead, such as /shoes/blue-running. Both can come from the same database, so what matters is whether each page has one stable, readable address.

How to spot a dynamic URL

Check your addresses for these signs. Each one usually means a script builds the page at request time.

  • A question mark followed by key-value pairs, such as ?id=482
  • A script extension in the path, such as .php, .asp, or .aspx
  • Only numbers in the path, such as /p/38217

When a dynamic URL is fine

Search engines can index a dynamic URL that serves unique content and has one stable address. The address becomes a problem when the same page is reachable through many versions, or when it says nothing about the page. If your CMS already gives each page one readable address, you have little to fix.

Rewrite the address, then redirect the old one

To clean up a dynamic URL, give the page a readable path and send the old address to it with a 301 redirect. The content stays the same, and only the address changes. The table shows how this looks on a typical store.

Dynamic addressClean addressWhat to do
/product.php?id=482/product/blue-running-shoes301 redirect the old address to the new one
/shoes.php?cat=12&page=3/shoes/running/page/3Keep pagination reachable, with each page holding its own title
/search.php?q=shoesNo clean version neededBlock crawling of internal search results, since they are not content to index

After the redirect goes live, test the old address with the free redirect checker to confirm it returns one 301 and lands on the new page in a single hop. For the wider rules, read our guide to SEO redirects.

Mistakes to avoid

  • Changing the path without a 301 redirect. Links and rankings do not move with the page by themselves.
  • Building the new path from the ID alone, so the address still says nothing about the page.
  • Leaving both versions live with no redirect or canonical, which splits signals between them.
  • Chaining redirects, where the old address points to a second address that points to the final one. Each extra hop adds delay and another point of failure.

Google's URL structure guidance suggests blocking dynamic URLs that generate search results, such as internal search pages.

Tip

Before you change anything, export your dynamic URLs with the most clicks from Search Console. Give each one a 301 target, or its traffic stays behind on the old address.

URL parameters and the query string: what they do for SEO

A query string is the part of a URL that starts with a question mark, such as ?color=red&size=9. Each parameter is a key and a value joined by an equals sign, and parameters are separated by ampersands. Search engines treat every distinct query string as its own address. A single product page can therefore turn into many crawlable URLs, even when the content barely changes.

Start by asking one question for each parameter: does it change what the page says? A filter that shows a different set of products, such as color, may deserve its own indexed page if people search for that combination. A sort order or a tracking tag usually does not. The answer decides whether you index the URL, point it to a clean version, or keep it out of the crawl.

Common parameter types

Parameter typeExampleUsual handling
Tracking?utm_source=newsletterCanonical tag pointing to the clean URL
Sorting?sort=priceCanonical to the default view, or block crawling
Filtering?color=redIndex only if people search for it, otherwise canonical
Session data?sessionid=8f3aRemove it from the URL and store the session in a cookie
Pagination?page=4Keep each page reachable through normal links, with its own title

Steps to control parameter URLs

  1. Export the URLs that contain a question mark from your crawler or server logs, then group them by parameter name.
  2. Decide for each parameter: index it, canonicalize it, or keep it out of the crawl.
  3. Link internally only to the URLs you want indexed, so your own navigation does not spread parameter versions.
  4. Add a canonical tag on each parameter version that points to the clean URL.
  5. Check the results in Search Console and your logs after a few weeks.

Use robots.txt with care

Blocking parameter URLs in robots.txt stops Google from crawling them. That also hides any canonical tag or noindex tag on those pages, because Google cannot read what it cannot crawl. Block only the parameters that create endless or useless combinations, and test each rule before you publish it. The rule below blocks sort URLs on every path.

User-agent: *
Disallow: /*?sort=

For the wider picture of filter pages, read our guide to faceted navigation SEO. To see how often crawlers request parameter URLs, check your server logs with log file analysis. For how search engines pick the original among similar pages, see duplicate content.

Tip

Keep tracking parameters out of your internal links. Add them only to the links in your campaigns, so your own navigation always points to clean URLs.

Sources

Frequently asked questions

What does URL stand for?

URL stands for Uniform Resource Locator. It is the unique address that points to a specific resource on the web, such as a page, image, or file, and tells a browser exactly where to find it and which protocol to use. In everyday terms, a URL is a website's address, the string you type or click to reach a page.

Should URLs contain keywords?

Including a relevant keyword in a URL can help users and search engines understand what a page is about, so a clear, descriptive slug is good practice. The key word is descriptive, not stuffed: repeating keywords looks spammy and adds no value. Aim for a short, readable URL that names the topic once, using hyphens to separate words and lowercase letters throughout.

Do URLs matter for AI search and GEO?

Yes, in two ways. A clean, crawlable URL helps AI crawlers reach and understand a page, and a descriptive URL gives an AI assistant a clear signal about the page's topic before it even reads the content. When an AI cites your page, the URL is also the link it shows, so a readable address looks more trustworthy than a string of random parameters.

Our Blog for Ambitious Company

Testimonials from ambitious founders

0 to 10000 visitors in 5 months

Celio Fabianomonrobotlavevitre.frGoogleE-commerce

0 to 5000 visits in 8 months

Thibault BMsorank.comGoogleSoftware

0 to 1104 clicks in 4 months

Dominiqueflight-sensations-idf.comGoogleLeisure and aviation

0 to 163 clicks in 6 months

Coworking Pariscoworking-paris.frGoogleOffice broker

x92 clicks in 7 months

Guide Zanzibarguidezanzibar.comGoogleTravel