大网数据广告活动
网站运营与故障问答

How do I set up a cookie-free subdomain when the website is on the naked domain (no "www")?

· 52CE 我爱测

The website (Wordpress) acts on http://example.com and sets cookies. Will http://static.example.com be cookie-free? Or http://static.example.com would be cookie-free only in case if the website acts on http://www.example.com ? As…

问题原文

原帖链接 · Evgeniy · CC BY-SA 3.0

The website (Wordpress) acts on http://example.com and sets cookies.

Will http://static.example.com be cookie-free?

Or http://static.example.com would be cookie-free only in case if the website acts on http://www.example.com?

Asked in another way: if the site acts on http://example.com, how to make http://static.example.com cookie-free?

已采纳解答

原帖链接 · Kristian Svensson · CC BY-SA 3.0

If you create the subdomain static.example.com it will usually be an empty page or location where you can add any content you like. It will not contain wordpress or any cookies as long as you don't install anything there.

However, if you add a wp installation there it will add cookies.

If you don't want cookies you need to add the html/code yourself. Just remember that if you add i.e. Google analytics to your website page(s) you will get cookies as well.

You can (almost) point the subdomain anywhere you like. If that place uses cookies then the subdomain will too.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2017-08-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。