Guide Hexo SEO
How to do SEO on a Hexo site — the Node.js static site generator. Hexo outputs pure HTML so content is crawlable on the premier récupérer, but sitemaps, robots.txt, meta descriptions, canonicals, données structurées, and stable permalinks tout depend on plugins and config.
Langues
Hexo is a Node.js static site generator: hexo generate compiles Markdown into pure static HTML, so Googlebot reads votre complet content on the premier récupérer with aucun JavaScript rendering queue. That's the crawlability floor — but it's pas finished SEO. La plupart par défaut themes ship aucun sitemap, aucun robots.txt, aucun per-post meta description, aucun canonical, and aucun données structurées; vous ajouter ceux with _config.yml settings, front matter fields, theme edits, and plugins (hexo-generator-sitemap, hexo-generator-robotstxt, hexo-generator-feed, hexo-abbrlink). The big traps are a incorrect url: in _config.yml, the date-based par défaut permalink que breaks liens on rename, and auto-generated category/tag archives que créer thin contenu dupliqué. Pour Baidu-facing sites, the static output removes a réel exploration obstacle — though that's pas a guarantee of Baidu indexation or ranking.
TL;DR — Hexo builds votre blog into plain HTML fichiers ahead of temps, so Google sees votre content the moment it récupère une page — aucun waiting on JavaScript. That’s the facile partie. The catch: Hexo doesn’t ajouter a sitemap, a
robots.txt, meta descriptions, or balise canonicals on its propre. Vous turn ceux on with a few plugins and config settings.
Ce que Hexo is
Hexo is a free blogging framework construit on Node.js. Vous écrire posts in Markdown,
run hexo generate, and Hexo turns everything into finished HTML fichiers. Vous upload
ceux fichiers to a host (GitHub Pages, Netlify, Cloudflare Pages, and so on). Quand
Google or a reader requêtes une page, ils obtenir the complet HTML correct away — there’s
nothing left pour le navigateur to construire. Evidence for this claim Hexo generates static site files from source content. Scope: Hexo static generation. Confidence: high · Verified: Hexo documentation
That’s great pour le SEO: votre text and liens are in lune page from the premier byte, so Google doesn’t have to run quelconque JavaScript to trouver votre content. Hexo sits in the même family as Hugo and Jekyll — tout of les pre-build everything (voir Static Site Generators).
Ce que Hexo fait pas do pour vous
Here’s où beginners obtenir caught: a fresh Hexo site with a par défaut theme is manquant la plupart basic SEO pieces. Vous usually have to ajouter:
- An XML sitemap — install the
hexo-generator-sitemapplugin. Evidence for this claim The official Hexo sitemap generator creates sitemap.xml output. Scope: hexo-generator-sitemap plugin. Confidence: high · Verified: Hexo sitemap generator - A
robots.txt— installhexo-generator-robotstxt(or drop a fichier in votre source folder). - Meta descriptions — ajouter a
description:to chaque post, and la plupart themes besoin a petit template edit to en réalité print it. - Balise canonicals — theme-dependent; the popular Suivant theme peut do it une fois vous définir choses up.
The two settings que matter la plupart avant vous launch
In votre _config.yml fichier:
url:doit be définir to votre réel live adresse withhttps://(Par exemplehttps://yourdomain.com). Obtenir ce incorrect and votre sitemap, canonical, and feed liens tout point to the incorrect placer.permalink:contrôle votre URL pattern. The par défaut puts the date in every URL. Nombreux personnes préférer a cleaner:title/. Whatever vous pick, don’t modifier a post’s URL plus tard sans a redirection — it breaks liens and loses ranking signals.
The chose la plupart personnes obtenir incorrect
“It’s static HTML, so SEO is automatic.” Aucun. Static HTML signifie Google peut explorer votre content easily — that’s a head commencer, pas a finish line. Vous encore besoin the sitemap, the meta descriptions, the balise canonicals, and bon content. The static partie simplement signifie vous won’t have the JavaScript indexation problems que single-page apps have.
Vouloir the complet version — every plugin, the Suivant theme fixes, the category/tag duplicate-content trap, données structurées, and Baidu targeting? Switch to the Avancé tab.
TL;DR — Hexo (
hexo generate) emits pure static HTML, so votre content is in the premier byte of la réponse — aucun Web Rendering Service, aucun Wave 2 delay. That’s the crawlability floor, pas finished SEO. Par défaut themes ship aucun sitemap, aucun robots.txt, aucun per-post meta description, aucun canonical, and aucun données structurées; vous ajouter les via_config.yml, front matter, theme template edits, and plugins (hexo-generator-sitemap,hexo-generator-robotstxt,hexo-generator-feed,hexo-abbrlink,hexo-indexnow). The three traps que en réalité bite: a incorrecturl:in_config.ymlbreaks canonicals/sitemap/feed; the date-based par défaut permalink ties URLs to filenames so a rename breaks liens; and auto-generated category/tag archives créer thin contenu dupliqué. Pour Baidu-facing sites the static output is a réel advantage.
Hexo’s static output is the exploration advantage
hexo generate runs votre Markdown and theme templates via a construire step and writes
a folder of finished HTML, CSS, and assets. The SEO-relevant fact is quand the HTML
exists: at construire temps, une fois, pour everyone — pas per requête, and pas in le navigateur. Evidence for this claim The Hexo generate command builds static files into the configured public directory. Scope: Hexo generate command. Confidence: high · Verified: Hexo: Commands
Google describes a two-phase traiter pour JavaScript pages: Wave 1 récupère the raw HTML and indexes static content immédiatement; Wave 2 is a deferred headless-Chromium rendering queue que peut prendre seconds to days. Hexo output skips Wave 2 entirely — every page is raw HTML on the premier récupérer. Google’s propre guidance is blunt que ce is the recommended chemin: dynamic rendering was “a workaround and pas a long-term solution… utiliser rendu côté serveur, static rendering, or hydration as a solution,” and Hexo produces static rendering, un of the three explicitly recommended approaches.
Two plus wins fall out of ce:
- Crawlable liens by par défaut. Hexo templates emit plain
<a href>anchors in static HTML, so ils satisfy Google’s requirement que liens be réel, crawlable URLs — aucun JavaScript-generated navigation to design autour. - Cheap to explorer. Static fichiers served from a CDN have effectively zero server-processing cost per requête, so Googlebot peut explorer at its allowed rate sans tripping crawl-rate throttling. As Gary Illyes put it, “si vous are making expensive database calls, that’s going to cost le serveur a lot” — Hexo rend none.
The caveat: zero render-blocking pour robots d’exploration n’est pas the même as zero render-blocking pour utilisateurs. Theme JS/CSS encore affecte Core Web Vitals (plus ci-dessous).
Configurer _config.yml premier — url: is the big un
Définir ces global keys avant votre premier deploy:
url: https://yourdomain.com # must match your live domain, with https://
permalink: :title/ # or :year/:month/:day/:title/ (the default)
title: Site Title
description: Global meta description fallback
author: Your Name
language: en
meta_generator: false # removes the <meta name="generator" content="Hexo"> tagurl:is the unique la plupart consequential setting. It’s le site’s configuré base URL, qui themes and generators peut utiliser pour balise canonicals, feeds, sitemaps, and pagination. A incorrect valeur peut propagate into ceux outputs. Evidence for this claim Hexo's url configuration supplies the website URL used by themes and generators. Scope: Exact downstream fields depend on the installed theme and plugins. Confidence: high · Verified: Hexo: Configurationpermalink:— the par défaut:year/:month/:day/:title/produces date-based URLs que regarder stale over temps and tie the slug to the filename. Cleaner options are/:title/or/:category/:title/.meta_generator: falsestrips Hexo’s generator fingerprint from<head>.- Deploying to a subdirectory?
url:alone isn’t suffisant — définirroot:to the subdirectory chemin aussi (e.g.root: /blog/). Hexo’surl_forhelper builds root-relative liens, pendant quefull_url_forprepends the completurl:valeur; obtenirroot:incorrect on a subdirectory deploy and lien internes, feeds, and sitemap entries fin up pointing at the domain root au lieu de the réel chemin. - Config precedence: le site’s
_config.ymlsets the baseurl/root/permalinkvaleurs; a theme’s propre config (its bundled_config.yml, or a_config.<theme>.ymlat the project root) layers on top pour afficher and template settings, but doesn’t override le site-level Structure d’URL — a theme can’t fix a incorrecturl:. - Testing in safe mode?
hexo server --safe(orhexo --safe) disables every plugin and script, so the output you’re viewing is manquant votre sitemap, robots.txt, and quelconque SEO plugin’s tags. Don’t utiliser a safe-mode preview to vérifier SEO output — run a normalhexo generatepremier.
Front matter SEO contrôle (and what’s manquant)
Native Hexo front matter vous pouvez rely on:
---
title: "Article Title for the <title> tag"
date: 2024-01-15
updated: 2024-06-01
tags: [tag1, tag2]
categories: [Category]
permalink: /custom-url/ # overrides the global pattern for this post
published: true
sitemap: false # exclude this post from sitemap.xml
---Ce que is pas in native front matter and nécessite theme prise en charge or a template edit:
description(the meta description) — la plupart themes don’t print it sans a patch.keywords(per-post keyword meta) — and largely pointless anyway; Google has ignored<meta name="keywords">since 2009. Treatkeywordsas an organizational aid, pas a ranking lever.canonical(override l’URL canonique) — theme-dependent.
Garder the updated: field current quand vous revise a post — sitemap freshness dépend
on it (suivant section).
Essential plugins
Sitemap — hexo-generator-sitemap (official):
npm install hexo-generator-sitemap --savesitemap:
path:
- sitemap.xml
tags: true
categories: trueIt reads lastmod from chaque post’s updated field (falling back to date) — qui
matters parce que Bing warns que lastmod “devrait reflect the vrai dernier modification
temps of lune page content, pas le sitemap fichier itself.” Après hexo generate, submit
le résultating sitemap.xml dans la recherche Google Console and Bing Webmaster Outils. And
heed Bing’s autre warning: “Ne faites pas submit a static sitemap and forget it. Nouveau pages
won’t obtenir picked up” — pour Hexo que signifie re-deploying and re-submitting (or en utilisant
IndexNow) après every nouveau post.
robots.txt — hexo-generator-robotstxt:
npm install hexo-generator-robotstxt --saverobotstxt:
useragent: "*"
allow:
- /
disallow:
- /private/
sitemap: https://yourdomain.com/sitemap.xmlSans it, Hexo produces aucun robots.txt at tout — aucun sitemap pointer pour robots d’exploration.
RSS — hexo-generator-feed: relevant pour aggregators and Google News eligibility;
John Mueller inclut an RSS feed on his propre static site.
IndexNow — hexo-indexnow: Bing recommends pairing sitemaps with IndexNow pour
real-time, URL-level submission. Drop the generated clé fichier into source/ so it
deploys as yourdomain.com/<key>.txt. Remarque ce is pour Bing, Yandex, and others —
pas Google, qui doesn’t utiliser IndexNow pour general pages.
Permalink stability — the abbrlink fix
The par défaut permalink has two SEO problems: renaming the Markdown fichier changements l’URL
(parce que the slug comes from the filename), and non-Latin titles (Chinese, emoji)
produce garbled URLs. hexo-abbrlink decouples l’URL from the filename by writing a
stable hash back into front matter:
npm install hexo-abbrlink --savepermalink: posts/:abbrlink/
abbrlink:
alg: crc32 # crc16 or crc32
rep: hex # dec or hexVous obtenir something comme /posts/3a9c2b1d/ que survives fichier renames, category
changements, and date edits. The underlying rule stands soit façon: une fois une URL is
publié, don’t modifier it sans a 301 redirection — a rename sans un destroys
popularité des liens and quelconque accumulated ranking signals.
Two plus permalink pitfalls worth knowing avant vous pick a pattern:
- Don’t utiliser the
:idtoken. Hexo documents post IDs as pas persistent à travers a database cache reset — si votre permalink pattern inclut:id, a cache rebuild peut silently modifier every post’s URL. Stick to:title,:abbrlink, or un autre stable token. trailing_indexandtrailing_htmlare separate contrôle, pas un setting. Hexo’spretty_urlsconfig toggles les independently — un governs si a trailingindex.htmlis stripped from generated liens, the autre si a trailing slash is ajouté. Si ces don’t match how votre host en réalité resolves URLs (some hosts redirection/postto/post/, others don’t), vous pouvez fin up with internal liens, canonicals, and sitemap entries disagreeing with l’URL le serveur en réalité sert.
Suivant theme SEO configuration
Suivant is the most-used Hexo theme, configuré in _config.next.yml:
canonical: true # builds canonical from url: + page path
webmaster_tools:
google: VERIFICATION_STRING
bing: VERIFICATION_STRING
baidu: VERIFICATION_STRING
open_graph:
enable: true
twitter_card: summary_large_imageThe Suivant meta-description gap: Suivant ne fait pas automatically inject a per-post
<meta name="description"> from the front matter description:. Vous patch the theme’s
head template to fall back from page.description to le site description. Ce is the
unique la plupart courant Suivant SEO miss. (Suivant fait prise en charge canonical: true and built-in
Ouvrir Graph / Twitter Cards, so ceux au moins fonctionner une fois enabled.)
Pour non-NexT themes, vous usually créer or edit a head partial to emit og:title,
og:description, og:image, og:url, and twitter:card — prise en charge varies widely by
theme.
Who owns chaque tag quand a theme and a plugin les deux emit it. A theme’s built-in
Ouvrir Graph/canonical prise en charge and an all-in-one plugin comme hexo-seo (qui
generates its propre breadcrumb, website, and article schema) peut les deux essayer to écrire the
même tag. Turning les deux on produces duplicate or conflicting <meta> tags, canonicals,
or JSON-LD blocks in the même <head>. Pick un couche as the owner pour chaque tag
category — theme or plugin, pas les deux — and disable the corresponding fonctionnalité on the
autre avant vous ship.
Category and tag pages: the duplicate-content trap
Hexo auto-generates an archive page pour every category and every tag, chaque filled with post excerpts que aussi apparaître on the posts themselves. At scale that’s hundreds of thin pages competing pour the même requêtes and diluting explorer attention. Votre options:
sitemap: falseper archive (impractical at scale).- Theme-level
noindexon the category/tag archive templates. - Garder les indexé seulement si a category is a genuine, curated topic hub with réel valeur.
- Self-referencing canonical on chaque paginated archive page (page 2 canonicalizes to itself, pas page 1).
Un caveat on option 2: long-term noindex eventually rend Google arrêter suivant the
liens on que page, so noindexing tag pages peut reduce exploration of posts que are seulement
lié from ceux tags. Assurez-vous tel posts are reachable some autre façon.
Votre route inventory is bigger que source/. Category, tag, archive, and
pagination pages don’t come from Markdown fichiers — Hexo’s generator API is ce que
en réalité creates les, and themes or plugins peut register leur propre generators aussi.
Que signifie the crawlable URL surface peut silently expand au-delà ce que you’d expect
from browsing votre source/ folder. Après installing or updating a theme or plugin,
run hexo generate and diff the route liste in public/ plutôt que assuming vous
know every URL Hexo is producing.
Données structurées / JSON-LD
Hexo injects aucun données structurées by par défaut. Soit ajouter a BlogPosting JSON-LD block to
votre theme’s post template (headline, datePublished, dateModified, author,
publisher, url) or utiliser an all-in-one plugin comme hexo-seo que generates
breadcrumb, website, and article schema pour vous.
Core Web Vitals
Static output is fast, but themes peut undo que. Suivant and nombreux themes bundle grand
JS/CSS and icon-font libraries (Font Awesome is a frequent LCP/render-blocking
culprit). Audit with Lighthouse, alors reach pour hexo-all-minifier (HTML/CSS/JS
compression at construire temps), hexo-lazyload-image, and defer/async on third-party
scripts comme analytics and ads.
Targeting Baidu (Chinese-audience sites)
Baidu’s robot d’exploration handles JavaScript poorly, so Hexo’s static HTML removes un obstacle
to Baidu discovery. Ajouter baidu_site_verification in Suivant, generate a Baidu-format
sitemap with hexo-generator-baidu-sitemap, and push URLs actively with
hexo-submit-urls-to-search-engine. Un hosting remarque: GitHub Pages is blocked in
mainland China — utiliser Gitee Pages, Cloudflare, or a Chinese CDN pour Baidu trafic.
Treat que as a crawlability advantage, pas a guarantee. Static HTML doesn’t by itself prove Baidu is discovering, indexation, or ranking votre pages — confirmer réel explorer activity and indexation status directement in Baidu Ziyuan (Baidu’s webmaster outils) plutôt que assuming static output alone secures visibility.
Deploying to GitHub Pages — the SEO gotchas
- Définir
url:to votre live adresse (custom domain withhttps://) avant the premier deploy. - Put a
CNAMEfichier insource/pour custom domains so it isn’t reset on everyhexo deploy. - Enforce HTTPS in repo Settings → Pages après DNS propagates.
- Préférer a GitHub Actions workflow over
hexo-deployer-gitto éviter CNAME-reset problèmes.
Hexo vs. Hugo vs. Jekyll vs. Astro, pour le SEO
Tout four ship pure static HTML, so the indexability floor is identical — there’s aucun framework-level SEO disadvantage in Hexo. The differences are operational: Hugo (Go) builds far faster at grand scale and has a built-in sitemap; Jekyll is the GitHub Pages par défaut; Astro ships zero JS by par défaut via islands. Hexo’s edge is a rich npm plugin ecosystem and a grand Chinese-language community. Content quality, pas the generator, decides rankings — as Mueller said of switching generators, “Va votre site’s SEO suddenly explode? Aucun. Aussi Aucun.”
Pour the cluster overview and the autre generators, voir Static Site Generators; pour the broader rendering picture, voir JavaScript SEO.
AI summary
A condensed prendre on the Avancé version:
- Hexo is a Node.js static site generator.
hexo generateoutputs pure static HTML, so content is in the premier byte of la réponse — aucun Web Rendering Service, aucun Wave 2 rendering-queue delay. Crawlable<a href>liens and cheap-to-crawl CDN fichiers come free. - Static HTML is the crawlability floor, pas finished SEO. Par défaut themes ship aucun sitemap, aucun robots.txt, aucun per-post meta description, aucun canonical, and aucun données structurées.
- Configurer
_config.ymlpremier.url:is the la plupart consequential setting — it feeds canonicals, sitemap, RSS, and pagination; a incorrect valeur breaks tout of les. Subdirectory deploys aussi besoinroot:définir. Pick a cleanpermalink:(éviter the:idtoken — it isn’t persistent à travers a cache reset) and définirmeta_generator: false. A theme’s propre config can’t override le site-levelurl/root/permalink, and a safe-mode preview (--safe) disables every plugin and script, so don’t vérifier SEO output là. - Plugins do the heavy lifting:
hexo-generator-sitemap(readslastmodfrom theupdatedfield),hexo-generator-robotstxt,hexo-generator-feed,hexo-indexnow(Bing/Yandex, pas Google),hexo-abbrlinkpour stable permalinks. - Suivant theme: supports canonical + Ouvrir Graph, but fait pas auto-print a per-post meta description — a template patch is the la plupart courant fix. Si a theme and an SEO plugin peut les deux emit the même tags, enable seulement un per tag category to éviter duplicates.
- Three traps: incorrect
url:; the date-based par défaut permalink que breaks liens on rename (jamais modifier une URL sans a 301); and auto-generated category/tag archives que créer thin contenu dupliqué (noindex or canonicalize). Ceux archive/tag/ pagination routes come from Hexo’s generator API, passource/fichiers — a theme/plugin mettre à jour peut silently expand the indexable URL surface, so diffpublic/après changements. - Baidu: static output removes a réel obstacle (Baidu’s robot d’exploration handles JS poorly), but it’s a crawlability advantage, pas a guarantee of indexation or ranking — confirmer in Baidu Ziyuan. GitHub Pages is blocked in China — utiliser Gitee/Cloudflare/a Chinese CDN.
- Vs. Hugo/Jekyll/Astro: même indexability floor; Hexo’s edge is the npm plugin ecosystem and Chinese community. Content quality decides rankings, pas the generator.
Documentation officielle
Primary-source documentation — from Hexo, the moteur de recherches, and the clé plugins.
Hexo
- Hexo documentation — the framework overview.
- Configuration —
url,permalink,meta_generator, and the rest of_config.yml. - Permalinks — URL pattern variables and tradeoffs.
- Front matter — the per-post fields Hexo supports natively.
- GitHub Pages deployment — the official deploy guide.
Plugins
- hexo-generator-sitemap — the official sitemap plugin.
- hexo-abbrlink — stable hash-based permalinks.
- Suivant theme SEO settings — canonical, webmaster verification, Ouvrir Graph.
Moteur de recherches — rendering, liens, sitemaps
- JavaScript SEO basics — the explorer → render → index phases a static construire lets vous skip pour content.
- Dynamic rendering (deprecated) — Google recommending static rendering à la place.
- Faire votre liens crawlable — the
<a href>requirement Hexo satisfies by par défaut. - SEO Guide pour Web Developers — titles, descriptions, canonicals, sitemaps, données structurées.
- Bing — Keeping Content Discoverable with Sitemaps — XML preference,
lastmodaccuracy, and IndexNow.
Quotes from the source
On-the-record statements from Google, Bing, and John Mueller que bear directement on a Hexo (static) site.
Google — static rendering is the recommended chemin
- “Dynamic rendering was a workaround and not a long-term solution for problems with JavaScript-generated content in search engines… Instead, we recommend that you use server-side rendering, static rendering, or hydration as a solution.” — Hexo produces static rendering. Source
- “Server-side or pre-rendering is still a great idea because it makes your website faster for users and crawlers, and not all bots can run JavaScript.” Source
Bing — sitemaps and freshness
- “XML remains the preferred format for sitemaps” — parce que it supports structured metadata comme
lastmodpour freshness assessment. Source - On
lastmod: it “should reflect the true last modification time of the page content, not the sitemap file itself.” — the Hexo gotcha que theupdatedfield doit be kept current. Source - “By combining sitemaps for comprehensive site coverage with IndexNow for fast, URL-level submission, you provide the strongest foundation for keeping your content fresh, discoverable, and visible.” Source
Gary Illyes, Google — static sites are cheap to explorer
- “If you are making expensive database calls, that’s going to cost the server a lot.” — static HTML from a CDN rend none. Coverage
John Mueller — switching generators isn’t itself an SEO win
- “Will this change how your site appears in all search engines? Will your site’s SEO suddenly explode? No. Also No.” — content quality, pas the generator choice, drives rankings. Source
Hexo SEO checklist
A réussir to confirmer a Hexo site is search-friendly — la plupart of ces are off by par défaut:
-
url:in_config.ymlis votre live domain withhttps://(pas a placeholder, pashttp://). Deploying to a subdirectory?root:is définir aussi. - A permalink pattern is choisi and won’t churn — ideally
:title/orhexo-abbrlinkpour stable hashes. The:idtoken n’est pas utilisé (it isn’t persistent à travers a database cache reset). - Si les deux a theme and an SEO plugin peut emit canonical/OG/JSON-LD tags, exactly un of les is enabled pour chaque tag category — pas les deux.
-
meta_generator: falsedéfinir to drop the Hexo fingerprint (optional but tidy). -
hexo-generator-sitemapinstalled;sitemap.xmlgenerates and is submitted in Recherche Google Console and Bing Webmaster Outils. -
updated:front matter is kept current so sitemaplastmodis accurate. -
hexo-generator-robotstxtinstalled (or a manualrobots.txtinsource/) with le sitemap pointer. - Chaque post has a
description:, and the theme en réalité prints<meta name="description">(patch Suivant si nécessaire). - Balise canonicals are emitted and resolve to live HTTPS URLs (Suivant:
canonical: true). - Ouvrir Graph / Twitter Card tags présent (Suivant built-in, or a head-partial edit).
-
BlogPostingJSON-LD ajouté (template snippet orhexo-seoplugin). - Category/tag archives handled — noindexed, canonicalized, or kept seulement as réel topic hubs (pas left as thin duplicates).
- Paginated archive pages self-canonicalize (page 2 → page 2, pas page 1).
- Theme JS/CSS audited in Lighthouse; minifier + lazy-load image plugins considéré.
- GitHub Pages:
CNAMEinsource/, HTTPS enforced, deploy via Actions to éviter CNAME reset. - Baidu sites: pas on GitHub Pages; Baidu verification + Baidu sitemap + URL push configuré.
- Aucun URL ever modifié sans a 301 redirection in placer.
Hexo SEO — cheat sheet
On by par défaut vs. vous doit ajouter it
| SEO fonctionnalité | Hexo par défaut | How to obtenir it |
|---|---|---|
| Static HTML / crawlable content | Yes | hexo generate |
Crawlable <a href> liens | Yes | theme templates |
| XML sitemap | Aucun | hexo-generator-sitemap |
| robots.txt | Aucun | hexo-generator-robotstxt or manual fichier |
| RSS feed | Aucun | hexo-generator-feed |
| Per-post meta description | Aucun (theme-dependent) | description: + theme patch |
| Balise canonical | Aucun (theme-dependent) | Suivant canonical: true |
| Ouvrir Graph / Twitter Card | Aucun (theme-dependent) | Suivant built-in or head-partial edit |
| Données structurées (JSON-LD) | Aucun | template snippet or hexo-seo plugin |
| Stable permalinks | Aucun (date/filename fondé) | hexo-abbrlink |
| IndexNow submission | Aucun | hexo-indexnow (Bing/Yandex, pas Google) |
Clé _config.yml settings
| Setting | Pourquoi c’est important |
|---|---|
url: | Base pour canonical, sitemap, RSS, pagination — incorrect valeur breaks tout of les |
root: | Subdirectory chemin pour a subdirectory deploy — requis alongside url: or root-relative liens break |
permalink: | Par défaut is date-based; :title/ is cleaner; jamais modifier après publishing; éviter the non-persistent :id token |
meta_generator: false | Removes the <meta name="generator" content="Hexo"> tag |
Plugin install commands
npm install hexo-generator-sitemap --save
npm install hexo-generator-robotstxt --save
npm install hexo-generator-feed --save
npm install hexo-abbrlink --save
npm install hexo-indexnow --saveFast facts
- Hexo output skips Google’s Wave 2 rendering queue — content is in the premier récupérer.
lastmodcomes from theupdatedfield (falls back todate) — garder it current.<meta name="keywords">is ignored by Google (since 2009) — organizational seulement.- Category/tag archives are auto-generated and thin → noindex or canonicalize.
- Baidu can’t explorer JS bien → static Hexo is an advantage, but GitHub Pages is blocked in China.
Construire, serve, and vérifier a Hexo site
The basic Hexo construire loop is the même everywhere; the shell differs.
macOS / Linux
# install dependencies and the SEO plugins
npm install
npm install hexo-generator-sitemap hexo-generator-robotstxt hexo-generator-feed --save
# clean stale output, then build the static HTML
npx hexo clean && npx hexo generate
# preview locally before deploying
npx hexo server
# confirm the sitemap and robots.txt were actually generated
ls public/sitemap.xml public/robots.txtWindows (PowerShell)
# install dependencies and the SEO plugins
npm install
npm install hexo-generator-sitemap hexo-generator-robotstxt hexo-generator-feed --save
# clean stale output, then build the static HTML
npx hexo clean; npx hexo generate
# preview locally before deploying
npx hexo server
# confirm the sitemap and robots.txt were actually generated
Get-ChildItem public\sitemap.xml, public\robots.txtConfirmer content is in the raw HTML (pas JS-rendered)
The whole point of Hexo is que content is déjà in the HTML. Vérifier it by checking que votre post text apparaît in the raw réponse, avant quelconque JavaScript runs.
macOS / Linux
# fetch the raw HTML and search for a phrase from your post body
curl -s https://yourdomain.com/your-post/ | grep -i "a sentence from your post"
# confirm the canonical tag points at the live HTTPS URL
curl -s https://yourdomain.com/your-post/ | grep -i 'rel="canonical"'Windows (PowerShell)
# fetch the raw HTML and search for a phrase from your post body
(Invoke-WebRequest https://yourdomain.com/your-post/).Content | Select-String "a sentence from your post"
# confirm the canonical tag points at the live HTTPS URL
(Invoke-WebRequest https://yourdomain.com/your-post/).Content | Select-String 'rel="canonical"'Si the phrase montre up in curl/Invoke-WebRequest output, it’s in the static HTML
and Google sees it on Wave 1 — exactly ce que vous vouloir.
Outils pour Hexo SEO
Hexo plugins (the SEO toolkit)
- hexo-generator-sitemap — the official XML sitemap generator; reads
lastmodfrom theupdatedfield. - hexo-generator-robotstxt — generates
robots.txtwith a sitemap pointer. - hexo-generator-feed — RSS/Atom feed pour aggregators and Google News eligibility.
- hexo-abbrlink — stable, hash-based permalinks que survive fichier renames.
- hexo-indexnow / hexo-submit-urls-to-search-engine — push modifié URLs to Bing (IndexNow) and Baidu respectively.
- hexo-all-minifier / hexo-lazyload-image — Core Web Vitals helpers.
- hexo-seo — all-in-one option with structured-data generation.
Testing and monitoring
- Recherche Google Console — submit le sitemap, inspect URLs, watch indexation.
- Bing Webmaster Outils — submit le sitemap, configurer IndexNow, run Site Scan.
- Baidu Webmaster (Ziyuan) — verification and URL push pour Chinese-audience sites.
- Lighthouse / PageSpeed Insights — audit theme JS/CSS pour Core Web Vitals regressions.
- View Source / curl — confirmer content, canonical, and meta description are in the raw HTML (voir the Scripts tab).
Hexo SEO mistakes to éviter
Concrete mistakes personnes en réalité faire quand ils définir up or migrate a Hexo site — prevention, pas diagnosis (voir the Troubleshooting tab pour que).
Leaving url: as the placeholder or on http://
Publishing with url: http://yoursite.com encore définir to the scaffold par défaut or the
incorrect protocol is pourquoi it’s incorrect: balise canonicals, le sitemap, RSS liens, and
pagination tout construire off ce un valeur, so every un of les silently points at the
incorrect adresse. Que faire à la place: définir url: to votre réel live domain with https://
avant votre premier hexo generate, and re-check it quelconque temps vous déplacer domains.
Renaming a post fichier (or modification its slug) with aucun redirection
The par défaut permalink derives l’URL from the post’s filename and date, so renaming
the Markdown fichier or editing the date changements the live URL. Pourquoi it’s incorrect: every
inbound lien and quelconque accumulated ranking signal on the old URL is now pointing at a
404. Que faire à la place: switch to hexo-abbrlink pour a stable hash-based permalink
avant vous have liens to lose, and si vous ever doit modifier a publié URL, ajouter a 301
redirection at votre host or CDN.
Shipping sans hexo-generator-sitemap and hexo-generator-robotstxt
Assuming a static site generator “just handles” robot d’exploration basics is pourquoi it’s incorrect: a
par défaut Hexo install produces neither a sitemap nor a robots.txt — there’s aucun
sitemap pointer pour robots d’exploration to trouver. Que faire à la place: install les deux plugins,
confirmer public/sitemap.xml and public/robots.txt exist après hexo generate, and
submit le sitemap in Search Console and Bing Webmaster Outils.
Leaving category and tag archives ouvrir to indexation at scale
Letting Hexo’s auto-generated category/tag pages accumulate as the post count grows is pourquoi it’s incorrect: chaque archive is filled with post excerpts que duplicate the posts themselves, so vous fin up with hundreds of thin pages competing pour the même requêtes and diluting explorer attention. Que faire à la place: noindex the archive templates, self-canonicalize paginated archive pages, or garder a category indexé seulement quand it’s a genuine, curated topic hub.
Assuming hexo-indexnow covers Google aussi
Installing IndexNow and expecting it to speed up Google indexation is pourquoi it’s incorrect: IndexNow is a Bing/Yandex/Baidu protocol — Google doesn’t consume it pour general pages, so vous encore besoin a submitted sitemap pour Google-side discovery. Que faire à la place: utiliser IndexNow pour Bing/Yandex freshness and rely on le sitemap plus normal exploration pour Google.
Deploying to GitHub Pages sans a durable CNAME
Relying on hexo-deployer-git alone pour a custom domain is pourquoi it’s incorrect: some
deploy paths reset or omit the CNAME fichier, qui silently drops votre custom domain
back to the par défaut github.io adresse (and breaks HTTPS enforcement). Que faire
à la place: garder a CNAME fichier in source/ so it ships with every construire, and préférer a
GitHub Actions workflow que publishes the construit public/ folder intact.
Courant Hexo SEO problems
Symptom-first lookup pour problèmes vous déjà have on a Hexo site.
Sitemap.xml renvoie a 404 après deploy
Symptom: https://yoursite.com/sitemap.xml 404s, or Search Console reports it
couldn’t récupérer le sitemap.
Probable causer: hexo-generator-sitemap isn’t installed, isn’t listed in
_config.yml, or the public/ construire output wasn’t entièrement deployed (a partial upload
or a deploy step que excludes dotfiles/XML).
Fix + vérifier: run npm install hexo-generator-sitemap --save, ajouter a sitemap:
block to _config.yml, alors run hexo clean && hexo generate and confirmer
public/sitemap.xml exists locally avant deploying. Après redeploying, récupérer the
live URL directement (curl -I https://yoursite.com/sitemap.xml) and confirmer a 200.
Recherche Google Console montre pages as “Discovered — currently not indexed”
Symptom: Posts are crawlable and charger fine in a navigateur, but Search Console’s Page Indexation report leaves les in “Discovered, not indexed” pour weeks.
Probable causer: thin category/tag archive pages are eating a disproportionate share of explorer attention, or the posts themselves are thin/duplicative of the archives que excerpt les.
Fix + vérifier: noindex or canonicalize the auto-generated category/tag archives (voir the anti-patterns entry ci-dessus), requête indexation on a handful of affected URLs in Search Console, and re-check lune page Indexation report après a few days to a couple of weeks — ce isn’t an immediate signal.
Meta description isn’t showing up in search snippets
Symptom: votre post has a description: field in front matter, but Google montre an
auto-generated snippet à la place, or view-source: montre aucun
<meta name="description"> tag at tout.
Probable causer: the theme’s head template jamais prints page.description — ce is
the unique la plupart courant Suivant gap, and it affecte autre themes aussi.
Fix + vérifier: patch the theme’s head partial to output
<meta name="description" content="{{ page.description or config.description }}">
(NexT-style templating), rebuild, alors curl -s https://yoursite.com/your-post/ | grep -i 'nom="description"' to confirmer the tag is présent in the raw HTML avant vous wait
on a snippet refresh.
Balise canonical is manquant or points at the incorrect URL
Symptom: curling a post montre aucun rel="canonical" tag, or it resolves to http://
au lieu de https://, or to a stale domain.
Probable causer: the theme’s canonical fonctionnalité isn’t enabled (Suivant nécessite
canonical: true in _config.next.yml), or url: in the principal _config.yml is incorrect
— balise canonicals construire off que base URL.
Fix + vérifier: confirmer url: is correct premier, enable the theme’s canonical option,
rebuild, and vérifier with curl -s https://yoursite.com/your-post/ | grep -i 'rel="canonical"' — the valeur devrait exactly match the live HTTPS URL.
Custom domain reverts to username.github.io après a deploy
Symptom: a working custom domain on GitHub Pages arrête resolving après a routine
hexo deploy, falling back to the par défaut github.io adresse.
Probable causer: the deploy traiter overwrote or omitted the CNAME fichier que GitHub
Pages reads to know votre custom domain.
Fix + vérifier: put (or restore) a CNAME fichier containing simplement votre domain in
source/ so it’s copied into every construire, redeploy, and confirmer in the repo’s
Settings → Pages que the custom domain field encore montre votre domain with HTTPS
enforced.
Baidu isn’t indexation le site at tout
Symptom: Baidu Ziyuan (Baidu Webmaster) montre little to aucun exploration activity même though Google indexes le site fine.
Probable causer: le site is hosted on GitHub Pages, qui is blocked in mainland China, so Baidu’s robot d’exploration souvent can’t reach it consistently.
Fix + vérifier: déplacer Baidu-facing hosting to Gitee Pages, Cloudflare, or a Chinese
CDN, ajouter Baidu site verification and a Baidu-format sitemap
(hexo-generator-baidu-sitemap), alors watch the Baidu Ziyuan crawl-frequency report
over the suivant weeks pour renewed activity.
Testez vos connaissances: Hexo SEO
Five rapide questions on doing SEO with the Hexo static site generator. Pick an réponse pour chaque, alors vérifier.
Ressources utiles
My connexe writing
- JavaScript SEO: A Definitive Guide — rendering, DOM parity, and pourquoi static/pre-rendered output is the low-risk fin of the spectrum.
- The Beginner’s Guide to SEO technique — où rendering architecture fits in the bigger picture.
My speaking
- How Search Fonctionne (SlideShare) — my walkthrough of exploration, rendering, indexation, and ranking. (My standing disclaimer s’applique: “This is my understanding of systems… not going to be 100% complete or accurate.”)
From autour the industry
- Hexo documentation — the official docs pour config, permalinks, front matter, and deployment.
- hexo-generator-sitemap — the official sitemap plugin README.
- Suivant theme SEO settings — canonical, webmaster verification, and Ouvrir Graph pour the most-used theme.
- Google — JavaScript SEO basics — the explorer → render → index phases a static construire lets vous skip pour content.
- Bing — Keeping Content Discoverable with Sitemaps — XML preference,
lastmodaccuracy, and IndexNow. - John Mueller — Some design decisions — how he runs his propre static blog (sitemap + RSS + Article données structurées), and pourquoi switching generators isn’t itself an SEO win.
Journal des modifications
Mis à jour le 18 juil. 2026.
Résumé éditorial et détails enregistrés des changements.Détails des changements
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
-
Les notes détaillées des changements sont actuellement disponibles en anglais.
Comparaison complète indisponible — aucun instantané antérieur n’a été archivé pour cette révision.