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

Exclude yclid and ysclid from URLs

Short answer

yclid, ysclid and _ym_debug are click-tracking parameters. They don't change the page, but they create duplicate URLs and pollute reports. Fix it with a self-referencing canonical that ignores them, and strip them from internal links and analytics.

  • yclid/ysclid tag ad and referral clicks; _ym_debug is a Metrica debugging flag.
  • Each parameter variant is a distinct URL to a crawler — the same page, indexed many ways.
  • 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.

At the end of 2021, Yandex began experimentally using the new yclid parameter to improve recognition of new search queries. This was prompted by restrictions on third-party cookies in some browsers, which reduced the effectiveness of identifying search phrases in Yandex.Metrica. This innovation led to duplication and incorrect display of conversions in GA.

yclid — Yandex Click Identifier, Yandex Click ID — авторазметка Яндекс

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

Since Google Analytics 4 does not provide functionality comparable to Universal Analytics for excluding URL parameters at the view level, you need to set this up yourself through Google Tag Manager. Use third-party templates available in the GTM Template Gallery.

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

Гугл таг менеджер

Then use Search Gallery and enter the query Query. As a result, you will see various templates, including the popular Query Parameter Stripping Utility by CardinalPath. Add it to your workspace.

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 your Google Analytics 4 configuration tag. In Tags, open your existing GA4 tag and override the page_location parameter in Fields to Set using the new variable.

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?
It's a Yandex click identifier appended automatically to links for click attribution. It doesn't change the page — it only helps Yandex tie a visit back to its source.
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 duplicate content penalties?
There's no penalty, but they create duplicate URLs that split signals and waste crawl budget. A clean canonical consolidates them without any penalty risk.
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.
Dima Mochalov
Dima Mochalov
SEO & AI Search Strategist · 9+ years · Head of SEO, Marketing Bear (Dubai)
written by a human who ranks things

Be the answer, not a footnote.

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