HOW TO CREATE COOKIE FREE DOMAIN IN WORDPRESS?

 In All, Optimization & Best Practices

Nowadays,optimization of site is most important and it’s good idea to use cookie free domains for static content in WordPress.Static contents are like images, JavaScripts and CSS.

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.


 

Recommended Posts

Leave a Comment

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Start typing and press Enter to search

WordPress Custom Registration Form with BootstrapFx Eliminate render-blocking JavaScript and CSS in above-the-fold Google PageSpeed