HOW TO CREATE COOKIE FREE DOMAIN IN WORDPRESS?
Cookie Free domain is the separate domain which will not serve cookie and speed up your website.You can create sub domain for serving a static content so when browser load content from separate cookie free domain will not send cookie data.
To Setup a Cookie Free Domain
Let’s understand cookie free domain concept. It’s very easy to setup in WordPress.First of all, create a cookie free sub domain. By default, top-level domain cookie will be included into subdomain requests also.
In wordpress, You can define that to serve cookie for domain or not so once you setup, cookie will not get shared on subdomain.
Let’s checkout the steps to set up cookie free domain in wordpress:
After creating a subdomain like static.domain.com, point out the domain to the wp-content directory of wordpress.
Now, Open your
wp-config.php file of wordpress and add the following line of code into it.
Freelance WordPress Developer