Currently Available: Need a skilled Software Developer for your next project?
Categories
SEO, GEO and AEO

URL Normalization Rules for AI Citation Datasets

When you export URLs from AI citations, referral logs, or source records, an aggressive cleanup rule can accidentally merge pages from different languages, locales, products, or editions. To avoid that, you generate a normalized identity URL, a comparison key that helps you spot records pointing to the same page. You use that key to flag likely duplicates while leaving the raw URL in the record untouched.

Store the observed URL, the identity key, the citation link, the referral data, and the page’s declared canonical URL (its stated preferred address) in separate fields. Only standardize syntax that cannot change page meaning, such as lowercasing the host. Keep path and query differences intact unless you have verified site-specific rules showing that they load the same content.

The examples below are hypothetical. Article setup: technical explainer: direct mechanism. This is an article-setup label, not evidence that a trial was conducted or that the examples were experimentally validated.

Keep each URL role in its own field

A URL in a citation dataset does several different jobs. The citation URL records what the source linked to, while a referral URL records where a visit came from. A normalized identity URL lets you compare records, and a canonical URL states which address the page prefers. Because each field supports a different task, keep their values separate.

Store the exact URL you collected in observed_url. If your collector follows redirects, save both the originally requested URL and the final destination in separate fields. Put the reader-facing link in citation_target_url, keeping useful fragments like #specs. Keep the referrer and campaign parameters as provenance data, and record the page’s declared canonical separately in declared_canonical_url.

Keeping these values apart also makes it easier to move records across citation, referral, and source exports. For a related approach to combining those records, see joining citation, referral, and CRM data.

Standardize safe URL syntax only

A URL has distinct parts: a scheme (https), a host (shop.example), a path (/products/widget), a query string (?sku=47), and a fragment (#specs). RFC 3986 allows a small set of syntax-level changes. You can lowercase the scheme and host, remove default ports, resolve literal . and .. path segments, and standardize percent-encoded forms of unreserved characters.

Apply those rules only when you build the identity key, and leave the original URL alone. Do not lowercase the path, decode reserved characters like an encoded slash into a path separator, or switch http to https unless you have verified site-specific evidence that both return the same page. RFC syntax rules never prove that two different paths or query strings represent the same content.

Google’s URL structure guidance notes that uppercase and lowercase letters in a path can matter, meaning /APPLE and /apple can load different pages. Keep path casing, internal slashes, and trailing slashes as you observed them unless testing or documented site rules confirm they are equivalent.

This conservative approach also protects variants encoded in paths. Your identity key keeps /en-us/products/widget/, /fr-fr/products/widget/, and /en-gb/products/widget/ separate, along with distinct product and edition segments. Two URLs that share a page title or product name can still represent different pages.

Preserve query parameters and fragments

Do not drop every query string or sort its parameters as a blanket rule. A server often uses query parameters to pick a product, edition, locale, currency, or page number. Keep parameters you know select content, and keep unknown parameters until someone reviews what they do. Even when your identity key omits an approved tracking parameter, keep the raw query string in the record.

Maintain a reviewed list for each site that identifies parameters which never change page content. If a site’s list marks a campaign parameter as pure visit tracking, your export can leave it out of the identity key while keeping it in observed_url and the referral fields. Google Analytics describes UTM campaign parameters as visit-tracking data and notes that their values are case-sensitive, as explained in Google Analytics campaign URL guidance. That guidance does not mean you can safely strip every query parameter from other sites’ identity keys.

In both the raw record and the parsed export, keep repeated parameters, blank values, key spelling and casing, and original parameter order. Different servers handle duplicate keys and parameter order in different ways. Keep fragments in citation targets too, since they often point to a specific section of a page. If your dataset needs a page-level key without an ordinary anchor fragment, store that key in a separate field. Leave hash-based routes like #/products/widget intact unless you verify that the site does not use the fragment for routing.

Treat canonical URLs as review evidence

A canonical URL is only a page’s hint about which address should represent a group of pages. In Google’s canonicalization documentation, Google explains that its own systems choose a representative URL and may ignore a site’s declared preference. Because of that, a canonical hint helps you review records, but it does not prove two records belong together.

Record both the canonical target and where your collector found it, such as an HTML tag or an HTTP header. Before you use a canonical hint to support a merge, check whether the target resolves, whether redirects send it somewhere unexpected, and whether it crosses a language, locale, product, or edition boundary. Google’s canonical URL guidance recommends pointing localized pages to a canonical URL in the same language when possible. That gives you a solid check during review, though it does not act as a universal identity rule for citation datasets.

Export identity, citation, and referral fields separately

A practical export preserves your raw evidence while giving each downstream task the exact value it needs:

Field What to store
observed_url Exact URL as collected
requested_url URL requested before any recorded redirects
final_url Destination after the recorded redirect chain
normalized_identity_url Conservative comparison key
citation_target_url Link to retain for the citation, including useful fragments
fragment Parsed fragment or citation locator
query_raw Original query string
query_parsed Parsed parameters with duplicates and order retained
referrer_url Referring page, when known
campaign_parameters UTM and other known attribution values
declared_canonical_url Canonical hint observed on the page or response
language_locale Language or locale evidence, when available
product_edition_variant Product, model, SKU, or edition evidence, when available
normalization_rule_version Rule-set version used to make the identity key
collision_status Review state for records that share an identity key

Take the hypothetical URL https://SHOP.example/en-us/products/widget?sku=47&utm_source=assistant#specs. Your normalization step lowercases the scheme and host while keeping /en-us/, sku=47, and #specs. The utm_source value stays in observed_url and campaign_parameters, and you omit it from the identity key only if a reviewed rule for that site marks it as non-content-changing.

The corresponding hypothetical French URL, https://shop.example/fr-fr/products/widget?sku=47&utm_source=assistant#specs, stays separate because its locale path differs. A URL with sku=48 or edition=2025 also stays separate when those values load different product or edition content.

Review every identity-key collision

A collision happens when two or more observed URLs generate the same normalized identity URL. When that occurs, your key may be grouping different pages together. Generate a collision report that lists each observed URL side by side with any differences in its path, parameters, fragment, canonical target, locale, product, or edition.

Check those fields before you merge anything. If the records differ by locale, product identifier, edition, or a content-selecting query parameter, block the merge unless a documented mapping explicitly states that your dataset does not need that distinction. Redirects and canonical tags can inform your review, but neither one proves equivalence on its own. Log your decision, the evidence behind it, and the normalization rule version so another person can reproduce the result.

For broader checks on how citation records change over time, see tracking changes in AI answer source datasets.

What I'm building

Delegate tasks. Get software.

Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.

Take a look at vroni.com

Email updates

Usually a new article and a few links I found interesting.

No spam. Unsubscribe with one click.

Leave a Reply

Your email address will not be published. Required fields are marked *