{"id":1470,"date":"2023-07-20T16:04:45","date_gmt":"2023-07-20T09:04:45","guid":{"rendered":"https:\/\/dev.artru.io.vn\/?p=1470"},"modified":"2023-10-30T21:37:01","modified_gmt":"2023-10-30T14:37:01","slug":"xoa-tham-so-fbclid","status":"publish","type":"post","link":"https:\/\/artru.net\/en\/xoa-tham-so-fbclid\/","title":{"rendered":"Remove ?fbclid parameter when sharing link from Facebook"},"content":{"rendered":"<h2 class=\"wp-block-heading\">What is the ?fbclid parameter?<\/h2>\n\n\n\n<p>When you share a website link on Facebook, it will add a ?fbclid parameter to the end of the URL like this.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"255\" src=\"https:\/\/cdn.artru.eu.org\/wp-content\/uploads\/2023\/07\/Vi-du-xoa-tham-so-fbclid.png\" alt=\"Example remove parameter ?fbclid\" class=\"wp-image-1501\"\/><figcaption class=\"wp-element-caption\">Example remove parameter ?fbclid<\/figcaption><\/figure>\n<\/div>\n\n\n<p>This parameter is used to track the source of traffic to your website from Facebook. However, in some cases, this parameter can cause SEO problems on tracking tools like GA4, ahref, Semrush...<\/p>\n\n\n\n<p>The ?fbclid parameter includes the following information:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The ID of the Facebook ad or post that led the user to your website.<\/li>\n\n\n\n<li>The ID of the user who clicked the link.<\/li>\n\n\n\n<li>The time the user clicked the link.<\/li>\n\n\n\n<li>The website the user is visiting when the link is clicked.<\/li>\n<\/ul>\n\n\n\n<p>The ?fbclid parameter makes your URL longer, harder to remember, and harder to share.<\/p>\n\n\n\n<p>?fbclid can be used to track the effectiveness of Facebook advertising campaigns and to understand how users find your website.<\/p>\n\n\n\n<p>However, if you do not have a need to track the link from Facebook, you can remove the ?fbclid parameter. This makes your urls cleaner and prevents the creation of multiple cache versions due to query parameters behind.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to remove ?fbclid parameter with Cloudflare<\/h2>\n\n\n\n<p>To remove the ?fbclid parameter when sharing website links on Facebook, you can use Cloudflare&#039;s Redirect Rules tool.<\/p>\n\n\n\n<p>Follow these steps:<\/p>\n\n\n\n<p>1. Go to your Cloudflare admin page.<\/p>\n\n\n\n<p>2. Click <strong>Rules <\/strong>\u2192 choose <strong>Redirect Rules<\/strong>.<\/p>\n\n\n\n<p>3. In the section <strong>Single Redirects<\/strong> \u2192 Press <strong>Create rules<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1213\" height=\"686\" src=\"https:\/\/cdn.artru.eu.org\/wp-content\/uploads\/2023\/07\/Redirect-Rules-Cloudflare.png\" alt=\"Redirect Rules Cloudflare\" class=\"wp-image-1485\"\/><figcaption class=\"wp-element-caption\">Redirect Rules Cloudflare<\/figcaption><\/figure>\n<\/div>\n\n\n<p>4. Fill in any field <strong>Rule name<\/strong>.<\/p>\n\n\n\n<p>5. In section <strong>If...<\/strong> tick the option <strong>Custom filter expression<\/strong>.<\/p>\n\n\n\n<p>6. Then select <strong>URI Query String<\/strong> \u2192 <strong>starts with<\/strong> \u2192 fill <strong><code data-no-translation=\"\" data-no-auto-translation=\"\">fbclid=<\/code><\/strong>.<\/p>\n\n\n\n<p>Or you can click &quot;Edit expression&quot; and paste this in.<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code data-no-translation=\"\" data-no-auto-translation=\"\">(starts_with(http.request.uri.query, \"fbclid=\"))<\/code><\/pre>\n\n\n\n<p>7. Next at <strong>Then <\/strong>\u2192 choose <strong>Dynamic<\/strong> \u2192 fill <strong><code data-no-translation=\"\" data-no-auto-translation=\"\">http.request.uri.path<\/code><\/strong> \u2192 Select <strong>302<\/strong> and press <strong>Save<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1216\" height=\"723\" src=\"https:\/\/cdn.artru.eu.org\/wp-content\/uploads\/2023\/07\/Remove-query-parameters-fbclid-Redirect-Rules-Cloudflare.png\" alt=\"Remove query parameters fbclid Redirect Rules Cloudflare\" class=\"wp-image-1481\"\/><figcaption class=\"wp-element-caption\">Remove query parameters ?fbclid Redirect Rules Cloudflare<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"has-vivid-red-color has-black-background-color has-text-color has-background\">I have chosen <strong>302 <\/strong>(temporary redirect) not <strong>301 <\/strong>(permanent redirect). Because <strong>301 <\/strong>will cache the user&#039;s browser. In case you want to revert back to the state keeping the ?fbclid parameter unchanged, it won&#039;t work until cache <strong>301 <\/strong>expired.<\/p>\n\n\n\n<p>After completing the steps on the URL from Facebook containing the parameter ?fbclid will redirect to the original URL without query parameters.<\/p>","protected":false},"excerpt":{"rendered":"<p>Tham s\u1ed1 ?fbclid l\u00e0 g\u00ec? Khi b\u1ea1n chia s\u1ebb m\u1ed9t link website tr\u00ean Facebook, n\u00f3 s\u1ebd th\u00eam m\u1ed9t tham s\u1ed1 ?fbclid v\u00e0o cu\u1ed1i URL gi\u1ed1ng nh\u01b0 th\u1ebf n\u00e0y. Tham s\u1ed1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1510,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[117],"class_list":["post-1470","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-website","tag-cloudflare"],"_links":{"self":[{"href":"https:\/\/artru.net\/en\/wp-json\/wp\/v2\/posts\/1470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/artru.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artru.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artru.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artru.net\/en\/wp-json\/wp\/v2\/comments?post=1470"}],"version-history":[{"count":0,"href":"https:\/\/artru.net\/en\/wp-json\/wp\/v2\/posts\/1470\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/artru.net\/en\/wp-json\/wp\/v2\/media\/1510"}],"wp:attachment":[{"href":"https:\/\/artru.net\/en\/wp-json\/wp\/v2\/media?parent=1470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artru.net\/en\/wp-json\/wp\/v2\/categories?post=1470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artru.net\/en\/wp-json\/wp\/v2\/tags?post=1470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}