WeChat Domain Verification Guide | Generated by AI

Home 2026.04

Question: How do I create and deploy a WeChat verification file for my blog, and when does WeChat require such verification?

Answer:

1. What you need to do

You were given a file like:

198976a221b3bd8c.txt

with content:

5354e

This is a domain ownership verification file required by WeChat.

✅ Step-by-step

Step 1 — Create the file locally

Inside your repo (/Users/lzwjava/projects/lzwjava.github.io):

cd /Users/lzwjava/projects/lzwjava.github.io

echo "5354e" > 198976a221b3bd8c.txt

Step 2 — Place it at the root

Make sure the file is at the root of your deployed site, not inside a subfolder:

lzwjava.github.io/
├── index.html
├── 198976a221b3bd8c.txt   ✅ MUST be here
├── ...

Step 3 — Commit and push

git add 198976a221b3bd8c.txt
git commit -m "Add WeChat verification file"
git push

Your GitHub Pages workflow (.github/workflows/gh-pages.yml) will deploy it automatically.


2. Verify deployment

After deployment, test:

https://lzwjava.github.io/198976a221b3bd8c.txt

It should return exactly:

5354e

⚠️ No HTML, no formatting, no newline issues ideally.


3. Important GitHub Pages details

Check your workflow (gh-pages.yml) to ensure:

If you are using a static generator (like Jekyll, Hexo, etc.):

Example for Hexo:

cp 198976a221b3bd8c.txt source/

4. When does WeChat require this?

WeChat requires this verification in several scenarios:

1. WeChat Official Account (公众号)

When you:

👉 They must confirm you own the domain


2. WeChat Open Platform (开放平台)

When configuring:


3. WeChat Mini Program (小程序)

When using:


4. WeChat Pay (微信支付)

When setting:


5. Why this method?

WeChat uses this simple method because:


6. Common mistakes (very important)


7. Quick checklist


If you want, I can also:


Back Donate