I have Cloudflare Pages deploying from GitHub with a custom domain. Both testy-cool.pages.dev and testy.cool work - but Google is indexing the wrong one.

The pages.dev URL is ranking instead of my actual domain. Without a proper 301 redirect, Google sees two separate sites with duplicate content and picks whichever it crawled first.
Bonus problem: sometimes Chrome flags the pages.dev URL with a "looks fake" warning because it resembles my custom domain.
The solution is a properly configured Bulk Redirect.
Fix the Bulk Redirect Entry
Cloudflare's Pages docs expect the exact Pages hostname as the source (not *.pages.dev/) and specific parameters enabled.
In Rules → Bulk Redirects → (your list) → Edit URLs, set:
| Field | Value |
|---|---|
| Source URL | testy-cool.pages.dev (no *, no trailing /) |
| Target URL | https://testy.cool |
| Status | 301 |

Enable These Parameters
Click Edit parameters and enable all of these:
- Preserve query string
- Include subdomains
- Subpath matching
- Preserve path suffix

Save, and make sure the Bulk Redirect Rule that uses this list is Enabled.
Test It
You should see 301 and a Location: https://testy.cool/some/path?x=1.
Getting pages.dev Out of Google
After the 301 is working:
- Make sure your site outputs canonical URLs pointing at your custom domain (and your sitemap uses the custom domain)
- In Google Search Console, add a URL-prefix property for
https://your-project.pages.dev/and use Removals / URL inspection to speed up cleanup
Google will eventually follow the 301 and consolidate ranking signals to your custom domain.
About the "Looks Fake" Warning
If you or your users see Chrome's lookalike-URL warning on the pages.dev URL:
The site you just tried to visit looks fake. Attackers sometimes mimic sites by making small, hard-to-see changes to the URL.
This is Chrome's lookalike-URL warning - it's generated in the browser by comparing URLs to popular/previously-visited sites. It doesn't mean your site is hacked.
Once the redirect works and Google stops surfacing the pages.dev URL, users won't hit that warning anymore.
References
- Cloudflare Docs: Redirecting *.pages.dev to a Custom Domain
- Chromium Docs: Lookalike Warnings in Google Chrome
Related
- How to Set Up a Blog with Fumadocs - If you're setting up a new Cloudflare Pages site
Last updated on