_redirects for static site

I want to redirect my static site on Cloudflare pages at clashverse(dot)pages(dot)dev to clashverse(dot)roshan(dot)cyou (set as an alternate custom domain already). For this I was trying to use the _redirects file with “https(://)clashverse(dot)pages(dot)dev https(://)clashverse(dot)roshan(dot)cyou 301” (can’t post links here, the links are used correctly) at the root folder. But this doesn’t seems to work.

I am using the same method on a react site with the _redirects file in the public folder and it works. Do I need to set up something for the static site or put the _redirects file in some folder other than the root one?

As noted in the redirects documentation here domain-level redirects aren’t supported.

This is (IMHO) an unfortunate thing. The suggestion (as seen in the Headers documentation) is to set the X-Robots-Tag header on the the pages.dev site e.g.

  X-Robots-Tag: noindex

Found a solution and thought to share it here for anyone who may stumble upon this in the future. I ended up deleting my Cloudflare page, made another one with the same name and uploaded an index.html file with <meta http-equiv="refresh" content="0; url=newurl">. Then I made another page with a different name, set it up, and pointed my domain to this new page. All in all, I skipped using the _redirects file.

Silly me. I read “Support” being “No” meaning there was no technical support if you had a problem, not that it doesn’t work at all.

Why even document it?