How to avoid extract .html extension form CF pages

When attempting to visit example.com/abc.html, Cloudflare Pages redirects the request to example.com/abc. While this redirection appears seamless at times, it poses a problem for Baidu’s search engine. Unlike Google, which now supports DNS-based verification, Baidu requires verification via the .html extension to authenticate the website host.

As a result, I’m facing difficulties with Baidu’s indexing. If Baidu cannot access example.com/abc.html properly, it consistently displays a “308 Permanent Redirect” error.

I’m wondering if there’s a solution to this issue using Cloudflare’s redirect rules. Any assistance would be greatly appreciated.

Solve it via add .html to .html suffix.

I write a blog about it:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.