{"id":112503,"date":"2023-10-06T16:11:26","date_gmt":"2023-10-06T20:11:26","guid":{"rendered":"https:\/\/optinmonster.com?p=111863&#038;post_type=optinmonster_docs&#038;preview_id=111863"},"modified":"2025-08-14T14:52:59","modified_gmt":"2025-08-14T18:52:59","slug":"how-to-make-optinmonster-cookies-persist-across-subdomains","status":"publish","type":"optinmonster_docs","link":"https:\/\/optinmonster.com\/docs\/how-to-make-optinmonster-cookies-persist-across-subdomains\/","title":{"rendered":"How to Make OptinMonster Cookies Cross Subdomains"},"content":{"rendered":"\n<p>Showing the same campaign on multiple subdomains and want to hide it on all subdomains once it&#8217;s been interacted with or converted? You can do this by making the campaign cookies cross subdomains.<\/p>\n\n\n\n<p>In this article, you&#8217;ll learn how to make OptinMonster <a href=\"https:\/\/optinmonster.com\/docs\/how-optin-cookies-and-the-global-cookie-work-in-optinmonster\/\" target=\"_blank\" rel=\"noopener\">cookies<\/a> cross subdomains.<\/p>\n\n\n\n<p><em><strong>This feature only allows cookies to persist across&nbsp;subdomains<\/strong><\/em>, e.g. from &#8216;blog.domain.com&#8217; to &#8216;store.domain.com&#8217;. Cookies will not persist from one top-level domain to another, such as from &#8216;domain.com&#8217; to &#8216;website.com&#8217;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Enable Cross Subdomain Cookies<\/h2>\n\n\n\n<p>To make OptinMonster cookies cross subdomains, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Navigate to the&nbsp;<strong>Display Rules<\/strong>&nbsp;view in the campaign builder.<br><img decoding=\"async\" title=\"Navigate to the Display Rules in the OptinMonster campaign builder. - OptinMonster\" sizes=\"(max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/06\/display-rules-view.jpg 800w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/06\/display-rules-view-300x210.jpg 300w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/06\/display-rules-view-768x538.jpg 768w\" width=\"800\" height=\"560\" class=\"alignnone size-full wp-image-180093\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/06\/display-rules-view.jpg\" alt=\"Navigate to the Display Rules in the OptinMonster campaign builder.\"><\/li>\n\n\n\n<li>From the&nbsp;<strong>Actions<\/strong>&nbsp;tab of the&nbsp;<a href=\"https:\/\/optinmonster.com\/docs\/how-to-create-and-import-saved-rulesets-in-optinmonster\/\">Ruleset<\/a>&nbsp;you\u2019re editing, locate the&nbsp;<strong>Cookie Settings<\/strong> section and toggle the <strong>Cross Subdomain Cookie?<\/strong> option.<br><img decoding=\"async\" title=\"Campaign cookies in the OptinMonster campaign builder. - OptinMonster\" sizes=\"(max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/07\/cookie-settings.jpg 800w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/07\/cookie-settings-300x212.jpg 300w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/07\/cookie-settings-768x542.jpg 768w\" width=\"800\" height=\"565\" class=\"alignnone size-full wp-image-180453\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/07\/cookie-settings.jpg\" alt=\"Campaign cookies in the OptinMonster campaign builder.\"><\/li>\n\n\n\n<li>When you\u2019re finished,&nbsp;<strong>S<\/strong><strong>ave<\/strong>&nbsp;the campaign.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span id=\"FAQs\" class=\"ez-toc-section\"><\/span>Examples<\/h2>\n\n\n\n<p>If you have a campaign set to show on pizza.com, and you have cross subdomain cookies enabled, any cookies related to that campaign will also be visible to pepperoni.pizza.com, ham.pizza.com, and bacon.pizza.com.<\/p>\n\n\n\n<p>If you have a campaign set to show on pepperoni.pizza.com, and you have cross subdomain cookies enabled, any cookies related to that campaign will be visible to pizza.com, ham.pizza.com, and bacon.pizza.com.<\/p>\n\n\n\n<div class=\"alert-box alert-blue\">\n<p class=\"alert-box-title\">Note:<\/p>\n\n\n\n<p>The Subdomain Cookie setting is configured for individual campaigns. Enabling it for one campaign <em>does not<\/em> automatically enable it for other campaigns in your account.<\/p>\n\n\n\n<p class=\"is-style-arrow-link has-link-color\"><\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"persist\">How can I learn more about cookies?<\/h5>\n\n\n\n<p><a href=\"https:\/\/optinmonster.com\/docs\/how-optin-cookies-and-the-global-cookie-work-in-optinmonster\/\" target=\"_blank\" rel=\"noopener\">See our general guide for configuring campaign cookies and global cookies<\/a>.<\/p>\n\n\n\n<p>You can also find a <a href=\"https:\/\/optinmonster.com\/gdpr\/cookies\" target=\"_blank\" rel=\"noopener\">list of all cookies that OptinMonster uses<\/a>, which is useful for GDPR and Cookie Consent tool configuration.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Can I make the cookies persist across other top-level domains, not just subdomains?<\/h5>\n\n\n\n<p>No, this feature only allows cookies to persist across&nbsp;subdomains, like from &#8216;blog.domain.com&#8217; to &#8216;store.domain.com&#8217;. Cookies will not persist from one domain to another, such as from &#8216;domain.com&#8217; to &#8216;website.com&#8217;.<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><span id=\"Troubleshooting\" class=\"ez-toc-section\"><\/span>Troubleshooting<\/h2>\n\n\n\n<h5 class=\"wp-block-heading\">I\u2019ve changed the default cookie settings but the new settings aren\u2019t working.<\/h5>\n\n\n\n<p>Be sure to test from a brand new Incognito window (aka private browsing session) OR manually clear the cookies from your browser before re-testing a campaign. This will ensure any previously set cookies are removed so the campaign can appear according to the new cookie settings you\u2019ve saved.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">My campaigns are reappearing in some browsers before the cookie expiration I set, why?<\/h5>\n\n\n\n<p>Some browsers now automatically remove first-party cookies after a specific period of time regardless of the expiration date set, like Safari and Brave.<\/p>\n\n\n\n<p>We recommend you refer to&nbsp;<a href=\"https:\/\/www.cookiestatus.com\/\" target=\"_blank\" rel=\"nofollow noopener\">Cookie Status<\/a>&nbsp;for the latest details on how cookies are handled in individual browsers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Showing the same campaign on multiple subdomains and want to hide it on all subdomains once it&#8217;s been interacted with or converted? You can do this by making the campaign cookies cross subdomains. In this article, you&#8217;ll learn how to make OptinMonster cookies cross subdomains. This feature only allows cookies to persist across&nbsp;subdomains, e.g. from&nbsp;&hellip;<\/p>\n","protected":false},"author":4657,"comment_status":"open","ping_status":"closed","template":"","documentation\/categories":[11],"documentation\/tags":[31399,31432,31487,31415,31856,31411],"class_list":["post-112503","optinmonster_docs","type-optinmonster_docs","status-publish","hentry","categories-functionality"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/112503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/types\/optinmonster_docs"}],"author":[{"embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/users\/4657"}],"replies":[{"embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/comments?post=112503"}],"version-history":[{"count":11,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/112503\/revisions"}],"predecessor-version":[{"id":206601,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/112503\/revisions\/206601"}],"wp:attachment":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/media?parent=112503"}],"wp:term":[{"taxonomy":"categories","embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/categories?post=112503"},{"taxonomy":"internal_tags","embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/tags?post=112503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}