Subdomain so với Subdirectory

Subdomains và subdirectories là functionally tương đương cho SEO. Google decides theo site cách treat mỗi — và hầu hết migration "wins" là confounded.

Xuất bản lần đầu: 26 thg 6, 2026 · Cập nhật lần cuối: 8 thg 8, 2026 · Advanced
Ngôn ngữ
1 tín hiệu bằng chứng trên trang này

MỘT subdomain (blog.ví dụ.com) là một tách biệt hostname; một subdirectory (ví dụ.com/blog/) là một path on đó giống nhau hostname. Google có không blanket preference và decides theo site liệu một subdomain là treated as part of trang web của bạn, dựa trên integration các tín hiệu như liên kết nội bộ. Đó case studies cho thấy big 'wins' từ moving subdomain→subdirectory là gần như luôn confounded — tốt hơn liên kết nội bộ, nội dung pruning, hoặc một CMS upgrade rode along với đó URL thay đổi. My advice: không migrate cho URL structure alone; đó risk thường outweighs đó upside. Subdirectories làm có real, concrete operational advantages (một Search Console thuộc tính, một analytics setup, site names trong tìm kiếm), nhưng những là convenience, không một xếp hạng edge.

TL;DR — Subdomains và subdirectories là cả hai viable cho tìm kiếm, nhưng they là operationally khác nhau. Google evaluates theo site liệu một subdomain là treated as part of trang web của bạn hoặc as một tách biệt entity — đó deciding factor là integration (liên kết nội bộ, consistent UX, related nội dung), không đó dot-so với-slash. Đó case studies cho thấy big gains từ subdomain→subdirectory moves là gần như luôn confounded: tốt hơn liên kết nội bộ, nội dung pruning, một CMS upgrade, hoặc analytics thay đổi rode along. My position: không migrate cho URL structure alone — đó risk thường outweighs đó upside. Subdirectories có thể carry operational advantages (shared routing, analytics, và xuất bản các hệ thống), nhưng những là convenience wins, không một xếp hạng edge. Bing concern là subdomain abuse (leasing, PBNs), không legitimate subdomain dùng. Và theo Google November 2024 site-reputation-abuse policy, moving nội dung giữa structures không cách sửa một spam violation.

Evidence for this claim Search Console Domain properties aggregate all subdomains and protocols, while URL-prefix properties can isolate a particular subdomain or path prefix. Scope: Current Search Console property behavior; not a ranking preference. Confidence: high · Verified: Google Search Console: Add a property Evidence for this claim Moving content between hosts or paths changes URLs and should use permanent redirects and updated canonical/internal signals. Scope: Current Google site-move operations, distinct from any inherent subdomain ranking claim. Confidence: high · Verified: Google Search Central: Site moves with URL changes

Điều gì they thực ra là

MỘT subdomain là một prefix trước đó root domain, separated by một dot — blog.example.com. đây là technically một tách biệt hostname, so điều này có thể point tại một khác nhau máy chủ, chạy một khác nhau CMS, và là owned by một khác nhau team. MỘT subdirectory (subfolder) là một path segment sau đó domain, separated by một slash — example.com/blog/. đây là luôn đó giống nhau hostname, và so đó giống nhau “site” từ một crawling và analytics standpoint. có một third option cho international hoạt động — một ccTLD như example.de — mà là luôn treated as một tách biệt site.

Điều gì Google thực ra says (và điều đó có nghĩa là gì)

Google tài liệu chính thức là blunt: “You should choose whatever is easiest for you to organize and manage. From an indexing and ranking perspective, Google doesn’t have a preference.” (bản dịch) «Bạn nên chọn whatever là easiest cho bạn để organize và manage. Từ an lập chỉ mục và xếp hạng perspective, Google không có một preference.» đó là đó headline — không blanket advantage either way.

Đó nuance là hơn quan trọng hơn đó headline. John Mueller có đã nói, “In general, we see these the same,” (bản dịch) «Nhìn chung, we see những đó giống nhau,» nhưng đã thêm đó he’d “personally try to keep things together as much as possible.” (bản dịch) «personally try để giữ điều together as nhiều as có thể.» Đó key word là personally — đó là một preference cho operational simplicity, không một statement đó subdirectories xếp hạng tốt hơn.

Đó deepest point Mueller có đã làm là đó có không blanket rule tại all: “sometimes that can include sub-domains, sometimes that doesn’t include sub-domains. Sometimes that includes sub-directories, and sometimes that doesn’t include specific sub-directories.” (bản dịch) «sometimes đó có thể bao gồm sub-domains, sometimes đó không bao gồm sub-domains. Sometimes đó bao gồm sub-directories, và sometimes đó không bao gồm cụ thể sub-directories.» Nói cách khác, Google decides theo site liệu một subdomain (hoặc ngay cả một subdirectory) là treated as part of đó main site. Đó các tín hiệu điều này dùng là integration các tín hiệu: liên kết nội bộ giữa đó section và đó root, consistent branding và UX, thematically related nội dung, và một coherent sitemap structure.

Gary Illyes confirmed đó flip side tại Pubcon 2023: subdirectories có thể là treated as tách biệt các trang cũng — “It’s not common on the English web but it is in other languages.” (bản dịch) «đây là không phổ biến on đó English web nhưng điều này là trong other languages.» So đó structural lựa chọn không đó lever mọi người think điều này là; đó integration là.

My position: đó “wins” là thường confounded

I wrote đó contrarian take on này cho Ahrefs trong March 2021, và I’ll restate điều này ở đây vì điều này vẫn holds. Đó belief đó subdirectories là SEO-superior rests on case studies đó move một section từ một subdomain để một subfolder và báo cáo một traffic jump. Đó vấn đề là đó những migrations gần như không bao giờ thay đổi chỉ đó URL.

Khi nhóm làm những moves, they typically cũng:

  • Improve liên kết nội bộ — đó section nhận properly woven vào đó main nav và contextual links cho đó đầu tiên time.
  • Prune hoặc rewrite thin nội dung as part of đó migration.
  • Upgrade đó CMS hoặc nền tảng, mà thường improves speed, templates, và crawlability.
  • Cách sửa analytics, so traffic đó đã là luôn có finally measured dưới một thuộc tính (cross-domain/cross-host tracking gaps là phổ biến on subdomains).

Bất kỳ một of những có thể move traffic. Thuộc tính đó toàn bộ gain để đó dot-becoming-một-slash và bạn đã confused correlation với causation. As I put điều này trong đó bài viết: thay đổi introduce risk, so think twice trước thay đổi từ một subdomain để một subdirectory nếu đó chỉ reason bạn là đang làm điều này là cho SEO.

Đó không có nghĩa là không case nghiên cứu isolates đó structure. Pink Cake Box là đó sạch nhất một I know of — Archive.org kiểm tra cho thấy không design hoặc nội dung thay đổi accompanied đó move, và organic sessions rose khoảng 40%. Đó reverse kiểm thử, IWantMyName moving subdirectory→subdomain và dropping về 47%, adds weight. I take những seriously. Nhưng họ là đó exceptions đó nhận sạch việc đo lường; đó HotPads/HubSpot-style cases mọi người cites đã có simultaneous thay đổi, và đó mọi người ai ran them (John Doherty on HotPads) có đã nói as nhiều. Correlation studies — đó “11.8M results” (bản dịch) «11,8M kết quả» và similar — là correlational by nature; các trang đó dùng subdirectories cũng tend để là lớn hơn và hơn SEO-mature.

Real kỹ thuật differences (những không phải myths)

Set đó xếp hạng debate aside — ở đó concrete operational differences, và they thường favor subdirectories cho closely-related nội dung:

  • Search Console. MỘT subdomain cần tách biệt verification và của nó own thuộc tính. (MỘT GSC Domain thuộc tính covers all subdomains tại khi, mà softens này.) Mueller: “We do have to learn how to crawl them separately but for the most part that’s just a formality for the first few days.” (bản dịch) «We làm có để learn cách crawl them riêng nhưng cho đó hầu hết part đó là chỉ một formality cho đó đầu tiên một vài days.»
  • Crawling. Với một subdirectory, Googlebot đã understands đây là đó giống nhau máy chủ — không re-learning period. Mueller được diễn đạt đó subdirectory advantage as: “this helps us with crawling since we understand that everything is on the same server and can crawl it in a similar way.” (bản dịch) «này helps us với crawling since we understand đó mọi thứ là on đó giống nhau máy chủ và có thể crawl điều này trong một similar way.»
  • Analytics. Một GA4 thuộc tính theo mặc định; không cross-domain/host configuration để capture đó section traffic.
  • Site names trong kết quả tìm kiếm. Google hỗ trợ site names cho domains và subdomains nhưng không cho subdirectories — một real, được ghi lại functional khác biệt.
  • Được ưu tiên Sources / thuộc tính-cấp độ tools. Some Search Console surfaces operate tại domain và subdomain cấp độ, không subdirectory cấp độ.
  • Giá trị liên kết. Backlink để một subdirectory là unambiguously dưới đó root domain. Cho một subdomain, liệu đó equity “luồng” để đó root phụ thuộc vào liệu Google xử lý đó subdomain as part of trang web của bạn — đó giống nhau theo-site evaluation as mọi thứ khác.

Khi một subdomain genuinely làm hợp lý

Subdomains không một mistake. Reach cho một khi:

  • đây là một genuinely tách biệt sản phẩm hoặc serviceapp.example.com, status.example.com, community.example.com.
  • Bạn cần kỹ thuật separation — một khác nhau CMS, một khác nhau stack, một khác nhau team, hoặc khác nhau infrastructure đó là far easier để chạy on của nó own hostname.
  • International targeting — Google lists subdomains (de.example.com), subdirectories (example.com/de/), và ccTLDs (example.de) as equally hợp lệ cho geotargeting. Subdirectories là operationally simplest; ccTLDs gửi đó strongest geo-tín hiệu; subdomains sit trong đó middle.
  • Lớn enterprises với multiple business units, nơi tách biệt GSC properties theo team là một feature, không một bug.

Điều gì Bing cares về

Bing không prescribe một structure cho legitimate các trang. Trong “Some Thoughts on Website Boundaries” (bản dịch) «Some Thoughts on Website Boundaries» (Frederic Dubut và đó Bing Quản trị viên web Tools team, November 2019), Bing concern là inorganic site structure — PBNs, doorways, và subdomain/subfolder leasing, nơi bên thứ ba nội dung là hung off một subdomain với minimal liên kết nội bộ cụ thể để leak site-cấp độ các tín hiệu để an unrelated party. Bing blunt warning: “If you offer free hosting on your subdomains and 95% of your subdomains are flagged as spam, Bing will expand penalties to the entire domain, even if the root website itself is not spam.” (bản dịch) «Nếu bạn offer free hosting on của bạn subdomains và 95% of của bạn subdomains là flagged as spam, Bing sẽ expand penalties để đó entire domain, ngay cả khi đó root website itself không phải spam.» Cho một thông thường business dùng của nó own subdomain, none of này áp dụng.

Này connects để Google site reputation abuse policy cập nhật (November 2024), mà là worth knowing: “Moving content to a subdirectory or subdomain within the same site’s domain name doesn’t resolve the underlying issue and may be viewed as an attempt to circumvent spam policy.” (bản dịch) «Moving nội dung để một subdirectory hoặc subdomain trong đó giống nhau site domain name không resolve đó underlying vấn đề và có thể là viewed as an attempt để circumvent spam policy.» So bạn không thể structure của bạn way out of một parasite-SEO vấn đề.

Đó reverse-proxy workaround

Nếu bạn là technically locked vào một subdomain — WordPress.com, một headless CMS, hoặc một tài liệu/help nền tảng bạn không thể self-host — bạn không có để migrate để nhận một subdirectory URL. Bạn có thể dùng một reverse proxy (Cloudflare Workers là đó phổ biến route) để serve blog.example.com as example.com/blog/ từ đó crawler và người dùng perspective. Đó URL mọi người sees là đó subdirectory path; đó backend vẫn giữ on đó subdomain install. Cloudflare documents này pattern trong một hai-part Workers series. đây là một legitimate, widely-dùng technique — chỉ là sure đó proxied nội dung là genuinely yours, không leased (see đó abuse policies trên).

Nên bạn migrate? Cách think về đó risk

My decision rule:

  • Stay put nếu của bạn subdomain là established, xếp hạng, well-linked từ đó root, và integrated. Migrating purely cho URL structure là risk với little reward.
  • Migrate khi bạn là đang làm một lớn hơn nền tảng migration anyway, hoặc đó subdomain có real kỹ thuật/performance các vấn đề — i.e., khi đó URL thay đổi là bundled với các cách sửa đó thực ra move đó needle.
  • Nếu bạn làm migrate, cách sửa đó confounders đầu tiên so bạn có thể đọc đó kết quả cleanly: liên kết nội bộ, nội dung quality, các chuyển hướng (301s), và analytics. Thì đó structure thay đổi là đó chỉ variable left.
  • Follow Google chính thức site-move workflow — map old URLs để new ones, chuyển hướng mỗi một of them, cập nhật liên kết nội bộ và sitemaps, verify đó new thuộc tính trong Search Console, và thì monitor một representative set of URLs rather hơn assuming đó move went cleanly.

Expect 2–4 weeks of fluctuation as Google xử lý các chuyển hướng, với recovery typically bên trong 4–6 weeks khi đó migration là đã xong correctly.

Nơi này fits

Này là một piece of cách bạn organize một site — siblings trong này cluster cover URL structure conventions, kiến trúc trang web và crawl depth, và faceted navigation, và đó international angle overlaps với hreflang và ccTLD decisions trong SEO quốc tế. Đó throughline là đó giống nhau: structure là một way để organize và manage nội dung, không một xếp hạng lever trong của nó own right.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.