What is cookie free domains? How to use Cookie-Free Domains?
A domain that serves no cookies is called cookie free domain. Cookie Free domains is a separate domain which will not serve cookie and boost up your website speed.You can create sub domain for serving a static content such as; HTML, CSS, Images, Java-Script, Icon file etc. So, when browser load content from the separate cookie free domain, it will not send cookie data and users don’t waste time and bandwidth transmitting cookies for them.
Why is Cookie-Free Domains Important?
When you use cookie-free domains on your website, you are able to separate the content that doesn’t require cookies from the content that does. This helps in improving your website’s performance by elimination unnecessary network traffic.
How to set up Cookie-Free Domains
If you set your cookies on a top-level domain (e.g. yourwebsite.com) you can create another subdomain (e.g. static.yourwebsite.com) to host all of your static files which will no longer result in any cookies being sent. The idea behind this is that all your static cookies will be now host in your subdomain.
Follow the simple steps below to set up cookie-free domains
1. Create a subdomain such as static.yourwebsite.com or cookie.yoursite.com
2. Point your new subdomain to the /wp-content directory of your WordPress installationHow to point
How to point sub-domain to the wp-content directory
a. Login to your cPanel
b. Click Subdomains
c. Click the Edit icon
d. Now, write /wp-content after the public_html (there should be no space)
e. Click Change
3. Now, Open your wp-config.php file of WordPress and add the following line of code into it.
define("WP_CONTENT_URL", "http://static.yourwebsite.com"); define("COOKIE_DOMAIN", "www.yourwebsite.com");
Now test your site using : GTmetrix.com
Latest posts by Suanlian Tangpua (see all)
- Moto G5 Review – Detailed Specification of Moto G5 - May 10, 2017
- SEO To Do List 2017 – 50 Tips! - April 23, 2017
- Genuine ways to make money online the ultimate guide to earning on the internet - March 6, 2017