blog.domain.com 与 domain.com/blog

发布于 2024-09-01 20:12:19 字数 1431 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

彼岸花ソ最美的依靠 2024-09-08 20:12:19

没有“最佳实践”适用。

该决定更多地是由行政考虑决定的,而不是其他任何因素。
一些考虑因素可能是:

子域

  • 您可以将其托管在与主站点完全不同的计算机上,
  • 这可能会使与主站点的集成变得更加困难(cookie、身份验证、数据库服务器等)
  • “博客” DNS 记录是第一个控制点

子目录

  • 博客软件最好使用与主站点相同的技术(例如 php)
  • 博客软件必须在主站点(例如 Linux)上使用相同的技术
  • 网络服务器是第一个控制点

据我所知,它对 SEO 的影响可以忽略不计。
它对 SEO 的不同之处在于长期争论的移动目标。截至 2015 年,有一个 激增 证据和对子目录的意见。

No "best practice" applies.

The decision is more often dictated by administrative considerations that anything else.
Some considerations might be:

Subdomain

  • you can host it on an entirely different machine to the primary site
  • it might make integration with the primary site more difficult (cookies, authentication, database servers, etc)
  • the "blog" DNS record is the first point of control

Subdirectory

  • the blogging software ideally uses the same technology as the primary site (eg php)
  • the blogging software necessarily uses the same technology at the primary site (eg linux)
  • the webserver is the first point of control

As far I'm aware it makes negligible difference to SEO.
The difference it makes to SEO is a long debated moving target. As of 2015 there is a surge of evidence and opinion toward subdirectories.

请帮我爱他 2024-09-08 20:12:19

如果您只想将博客交换到另一台服务器,子域会更容易(因为您可以更改子域的 DNS,但保持域的主要部分指向原始计算机),但它们也可以发出 AJAX 请求和 cookie由于子域在某些情况下被视为“不同的域”,因此行为有所不同。

Subdomains make it easier if you want to swap just the blog over to another server (since you can change the DNS for the subdomain but keep the main portion of the domain pointing to the original machine), but they can also make AJAX requests and cookies behave differently due to subdomains being seen as "different domains" in some cases.

゛时过境迁 2024-09-08 20:12:19

blog.domain.com 被解释为一个独立的网站,而domain.com/blog 被视为domain.com 的子页面或子目录,具体取决于您的博客的设置方式。我相信谷歌分析甚至可以选择验证和跟踪子域,将它们分割为一个单独的站点。

像 DIYNetwork.com 和 About.com 这样的网站使用子域,因为尽管它仍然依赖于父 URL,但它允许有机会容纳一个完全不同且独立的网站,并且可以轻松跟踪分析。

blog.domain.com is interpreted as a website all on it's own where as domain.com/blog is see as a sub-page or sub-directory of the domain.com depending on how your blog is setup. I believe Google Analytics even has an option to verify and track sub-domains, which segments them as a separate site.

Site, like DIYNetwork.com and About.com utilize sub-domains, because even though it is still dependent on the parent URL it allows opportunity to house an entirely different and independent website with ease in tracking analytics.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文