How do I set up a cookie-free static subdomain?

What should I write in .htaccess?

This is my htaccess file:

Options -Indexes

<files ~ "^.*.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</files>


Header unset Cookie
Header unset Set-Cookie


ErrorDocument 403 /404.html
ErrorDocument 404 /404.html


RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !=https
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

Is it really worth using static.example.com?

I’m using Cloudflare but the static subdomain is off.

  • I have 1 main website
  • 2 forum
  • and 2 identical pages (only the subdomain and database are different)

Maybe ask this question on Webmasters Exchange