www 与非 www 对比
Embed This Widget
Add the script tag and a data attribute to embed this widget.
Embed via iframe for maximum compatibility.
<iframe src="https://tldfyi.com/iframe/glossary/www-vs-non-www/" width="420" height="400" frameborder="0" style="border:0;border-radius:10px;max-width:100%" loading="lazy"></iframe>
Paste this URL in WordPress, Medium, or any oEmbed-compatible platform.
https://tldfyi.com/glossary/www-vs-non-www/
Add a dynamic SVG badge to your README or docs.
[](https://tldfyi.com/glossary/www-vs-non-www/)
Use the native HTML custom element.
www 与非 www 的选择决定了您的网站是通过 www.example.com 还是 example.com 访问。两者都有效;重要的是选择一个作为 [[canonical-url|规范版本]],并通过 [[301-redirect|301 重定向]] 将另一个指向它。
示例
Most modern websites use the non-www version (example.com) as canonical, redirecting www.example.com to it with a 301.