a zine about getting found — issue 01
filed under: home / blog / exclude yclid and ysclid from urls
note · Technical SEO · published · updated

Exclude yclid and ysclid from URLs

Short answer

yclid identifies Yandex Direct ad clicks, while ysclid helps Yandex Metrica attribute visits from Yandex organic search when third-party cookies are restricted. If the page content is unchanged, point parameter variants to the clean canonical URL and keep internal links clean. Preserve any identifier needed for attribution before normalizing analytics reports.

  • yclid tags Yandex Direct ad clicks; ysclid supports organic search-query attribution; _ym_debug is a Metrica debugging flag.
  • Each parameter variant is a technically distinct URL, even when it returns the same page content.
  • The clean fix is a canonical tag pointing at the parameterless URL, applied site-wide.
  • Don't Disallow them in robots.txt — that blocks crawling of pages that got the parameter appended.
  • Filter them out of analytics so sessions group by the real page, not by tracking noise.

Yandex documents ysclid as a parameter added to selected organic search-result URLs in browsers with third-party-cookie restrictions. It helps Metrica recover search-query reporting. Yandex separately documents yclid for Yandex Direct conversion attribution. Neither parameter changes the destination page, but third-party analytics and crawlers can still record the full parameterized URL.

Exclude yclid and ysclid from URLs

How to report a clean URL in Google Analytics 4

Google Analytics 4 records the complete page URL in page_location. If these parameters fragment your page reports, you can normalize that field through Google Tag Manager. This reporting change does not fix canonicalization for search engines, and it must not discard an ad-click identifier before your attribution setup captures it. Test the implementation against the site’s current consent and conversion-tracking requirements.

First, open your container in Google Tag Manager and go to the Templates section.

How to disable the special parameter — ysclid — when navigating to your site from Yandex search results

Then use Search Gallery and enter the query Query. The screenshots below show the Query Parameter Stripping Utility workflow available when this implementation was documented. Review any community template’s permissions, maintainer and current behavior before adding it to a production container.

Query Parameter Stripping Utility
How to disable the special parameter — ysclid — when navigating to your site from Yandex search results

Next, create a new variable to exclude parameters by going to Variables and selecting Query Parameter Stripping Utility.

How to disable the special parameter — ysclid — when navigating to your site from Yandex search results
How to disable the special parameter — ysclid — when navigating to your site from Yandex search results

In the window that opens, you will see the following variable settings.

How to disable the special parameter — ysclid — when navigating to your site from Yandex search results

Configure the variable to exclude the required parameters, such as yclid and ysclid, by specifying them in the Only these parameters will be removed field.

How to disable the special parameter — ysclid — when navigating to your site from Yandex search results

Fill Field which needs parameters removed with {{Page URL}}.

How to disable the special parameter — ysclid — when navigating to your site from Yandex search results

After naming the variable, save it.

To finish, edit the Google tag or GA4 configuration used by the current container and override the page_location parameter with the validated clean-URL variable. Google’s documentation requires a valid URL when this automatically collected parameter is overridden.

How to disable the special parameter — ysclid — when navigating to your site from Yandex search results

After making the changes, save them and verify that the setup works correctly by launching GTM Preview mode and adding the excluded parameters to your site’s URL.

What is ysclid in a URL?
Yandex adds ysclid to selected organic search-result URLs in browsers with third-party-cookie restrictions. It helps Yandex Metrica attribute the visit and recover search-query statistics. It does not change the page content, but third-party tools may record the parameterized URL separately.
Should I block yclid and ysclid in robots.txt?
No. Blocking crawl prevents engines from reading your canonical tag on those URLs, so duplicates can linger. Use a self-referencing canonical instead.
Do these parameters cause a duplicate-content penalty?
A parameterized copy is not an automatic penalty. The operational risk is duplicate URL discovery, fragmented reporting and inconsistent canonical signals. When the content is identical, use a consistent clean canonical, avoid parameterized internal links and verify how search engines actually index the URLs.
Where does _ym_debug come from?
It's a Yandex Metrica debugging flag. It should stay in development; if it's appearing on live, indexable URLs, remove it from any links and confirm your canonical ignores query strings.

Sources

Dima Mochalov
Dima Mochalov
SEO & AEO Specialist · 9+ years · Head of SEO, Marketing Bear (Dubai)
written by a human who ranks things
About the author

Be the answer, not a footnote.

reply is fast — it’s just me here
iNevidimka — Dima MochalovPrivacy · Terms · Editorial · Methodology · © 2026
Operated by Mochalov Dmitri Andrei IE (Individual Entrepreneur (Armenia)) · Reg. 20268705 · Arghishti str. 7, suite 0015, Yerevan, Kentron, Armenia · +1 (352) 665-8350 · Google Maps. All engagements are governed by our Terms of Service.