How to Use Cookie-Free of charge Domain in WordPress? ๐Ÿช (Complete Tutorial)

Have you at any time checked the performance of your web-site with an online resource? I’m confident you have found a cookie-cost-free area identify error 1 in advance of.

For instance, tools like Gtmetrix, Pingdom, and etc. examine your overall website and exhibit a report, and inform you which components are performing good and which elements need added focus. Even though employing this resource, you may perhaps come throughout the Use cookie-cost-free domain error.

HTTP cookies have details sent to the user’s browser by web webpages. When searching the web-site, this information will be stored in the browser. On the future check out, the details will be despatched to the server to remind the person of their information and facts.ย ย 

What is the cookie-free domain? How and why ought to we use
the cookie-no cost domain in WordPress?

In this article, we are going to go over how to use the
cookie-no cost area in WordPress.

Right here is a transient explanation of what a cookie-totally free domain is in advance of we shift on to how to use a single in WordPress. The cookie-cost-free area is a area that does not ask browsers to retailer cookies from the site.ย ย 

Commonly, internet websites have static data, which might by no means
transform. Photos, CSS data files, JavaScript and and many others.

Owing to the simple fact that these data files are generally the exact and continue to be unchanged, a cookie does not will need to be saved by the browser. Therefore, if you modify the area, you can reduced the requests the user sends to the server. This is valuable in quite a few strategies.

This pace and functionality can be utilized elsewhere somewhat than squandered on storing unwanted cookies on the user’s browser. What is the main explanation powering this? Perfectly, the principal purpose is to increase the website’s performance.

By decreasing the cookie requests, your internet site will run
efficiently and it can reply important requests more rapidly.

We now know what is a cookie-free of charge domain and why you must use it. Usually, using a cookie-cost-free area has two benefits:

  1. Lowers community site visitors.
  2. Decreases the time needed
    to load static material.

Minimize Loading Time for Static Articles

Now it truly is time to find out how to use the cookie-absolutely free area in
WordPress. Configuring the cookie-free domain in WordPress may well seem tricky.
But it’s pretty easy if you observe the actions under.

Substantially like other tutorials on our web-site, we would introduce
many techniques to use the cookie-totally free area in WordPress. For instance, applying a
CDN, or a independent area. In this short article, we are going to explore practical

Keep in intellect, if your domain title configuration is established to use cookies, all of the subdomains will use the exact configuration. Consequently, to use the cookie-no cost domain you will need to have to use a individual area for your static cookies.

The dilemma is, how to use the cookie-no cost area in

1. Make a subdomain. For instance, and configure it to acquire all the static info.

2. Redirect the produced subdomain to wp-written content in your WordPress internet hosting. If you use cPanel, observe the image beneath. Transform Document Root to public_html/wp-articles.

3. In your host, appear for the wp-config.php file and incorporate the following code to it, or if the code by now exists, substitute it with the following:

define("WP_Articles_URL", "")
outline("COOKIE_Area", "")

4. Now you ought to redirect all the posts to the new subdomain. Only, operate the following command in the SQL Database:

UPDATE wp_posts Established article_written content = Replace(submit_material,'','')

You only have to have to do that. In buy to get static cookies, you merely will need to comply with the methods stated over in purchase to configure the current subdomain to do so.ย ย 

The future technique is by utilizing NGINX. If you would like to acquire static info on the server, the initially is phase is to offer a cookie-free of charge area.

The next move is to link the new domain to the similar
server your primary domain is.

The initially domain is the principal area and the 2nd domain is
the static area.

maindomain.comย ย ย  Aย ย ย 
static.maindomain.comย ย ย  Aย ย ย 

Now itโ€™s time to modify the ngix.conf file. Insert the
following code to the ngix.conf file:

    pay attention ip:80
    root /srv/http/nginx/
    access_log      logs/
    place / 
        index index.html
        charset   utf-8

    pay attention  ip:80
    root /srv/http/nginx/
    place / png

The up coming action is to load the images through the static
area, Just, reference static knowledge to the domain.

Just before:

Soon after:

Now if thereโ€™s any request for the image, it will be asked for from

You can also use a CDN in WordPress to use cookie-free domains. Most CDN supplies the alternative for you to ignore cookies if you want. The challenge is to pick the proper CDN for your requirements. Distinct CDNs have diverse characteristics. Combining them all won’t be able to be a viable solution.ย ย 

We are not heading to go over which CDN can lead to concerns. We
would like to introduce a handy and correct CDN to you. Our recommendation is KeyCDN.
To use this CDN on your web-site you can use its plugin.

Follow the methods underneath:

1. To start with, head about to the official KeyCDN internet site and create a new account. This web-site permits its people to use a person month for free of charge and if you are satisfied with the companies, buy the total package deal.

2. From the official WordPress site, download the CDN Enabler plugin. Set up and activate it.

3. From KeyCDN Dashboard, develop a new Pull โ€“ Zone.

4. Copy the address of the developed zone and paste it in the WordPress plugin you put in.

Paste the copied URL here:

  • When everything is finished,
    delete your websiteโ€™s cache.

This is every little thing you must do. To make guaranteed you have
followed the steps accurately, use a single of the web page analyzers instruments to examine
your website.

Cookie-absolutely free mistakes are among the the most usually taking place errors in Gtmetrix. No subject what you do to take care of it, they constantly come again. Why is this occurring?ย ย 

You will still see the error in the analyzer if Strip Cookies and Cache Cookies are enabled in KeyCDN. Which is known as the false-favourable rule.ย ย 

As outlined previously mentioned, when you set cookies on your main
domain, all subdomains will use cookies as perfectly. Even the CDN URL will use

If you have the Strip Cookies alternative enabled, the YSlow error is completely wrong. In simple fact, YSlow does not test if you have this selection enabled or not, which is why you obtain it.

If you use a cURL in Chromeโ€™s Dev tool, you can overlook this

In addition, if you are making use of Cloudflare, you are unable to reach 100 in YSlow that quickly. Cloudflare makes use of _cfduid cookie for each individual ask for and owing to stability reasons, you can not delete it. Hence, you will receive a cookie-absolutely free domain mistake.ย ย 

Leave a Reply