Skip to content

Conversation

@huan
Copy link
Contributor

@huan huan commented Nov 13, 2025

The site content is Wechaty Project Website

This PR requests a JS.org subdomain for the Wechaty community website.

Domain: wechaty.js.org
Target: wechaty-js-org.pages.dev

Cloudflare Pages deployment is live and HTTPS-enabled.
The website is a reverse-proxy that merges two GitHub Pages repos:

  • Docusaurus docs
  • Jekyll blog

Thank you!

Copilot AI review requested due to automatic review settings November 13, 2025 23:29
Copilot finished reviewing on behalf of huan November 13, 2025 23:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the wechaty subdomain from its old CDN hosting (cdn.chatie.io) to a new Cloudflare Pages deployment (wechaty-js-org.pages.dev), removing the // noCF comment that previously indicated the domain should bypass Cloudflare proxying.

Key Changes

  • Updated target URL from cdn.chatie.io to wechaty-js-org.pages.dev
  • Removed the // noCF comment since Cloudflare Pages domains work well with Cloudflare proxying

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MattIPv4 MattIPv4 changed the title Update wechaty URL to new pages.dev domain wechaty.js.org Nov 13, 2025
Copy link
Member

@MattIPv4 MattIPv4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Hi! You need to fill out the PR description template that was provided to you when you created your PR, as we need the information it requests to process your subdomain request. If you need to reference the template again, it can be found at https://raw.githubusercontent.com/js-org/js.org/refs/heads/master/PULL_REQUEST_TEMPLATE.md -- the description of your PR must match the format in the template exactly, with you providing the information that it requests.

@MattIPv4 MattIPv4 added the missing information This PR does not have all the requested information in the PR description label Nov 14, 2025
@huan
Copy link
Contributor Author

huan commented Nov 14, 2025

@MattIPv4 thanks for the notice, I have updated the description of PR to include those questions.

@huan huan requested a review from MattIPv4 November 14, 2025 00:29
Copy link
Member

@MattIPv4 MattIPv4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Commit valid, site has content based on https://wechaty-js-org.pages.dev/

I trust that your site is configured ready to work with the requested js.org subdomain.

@MattIPv4 MattIPv4 added change This PR/issue is regarding making a change to an existing subdomain external page This PR has a target of a site that isn't GitHub Pages and removed missing information This PR does not have all the requested information in the PR description labels Nov 14, 2025
@indus indus added the error The page requested returns an error label Nov 14, 2025
@indus
Copy link
Member

indus commented Nov 14, 2025

@huan I've just made the change:

grafik

But the page/cloudflare returns an error now.

@indus
Copy link
Member

indus commented Nov 14, 2025

@huan FYI: #9927 (comment)

@huan
Copy link
Contributor Author

huan commented Nov 14, 2025

@indus Thank you so much for merging and pointing out the issue.

I have fixed it with this script:

#!/bin/sh

CF_ACCOUNT_ID=$1
CF_ACCOUNT_EMAIL=$2
GLOBAL_API_KEY=$3

curl -X POST \
  "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/pages/projects/wechaty-js-org/domains" \
  -H "X-Auth-Email: $CF_ACCOUNT_EMAIL" \
  -H "X-Auth-Key: $GLOBAL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"name":"wechaty.js.org"}'

curl -X GET \
  "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/pages/projects/wechaty-js-org/domains" \
  -H "X-Auth-Email: $CF_ACCOUNT_EMAIL" \
  -H "X-Auth-Key: $GLOBAL_API_KEY"

Output:

# POST
{
  "result": {
    "id": "f29c763d-99b8-42a5-b872-890ebefc6b7d",
    "domain_id": "f29c763d-99b8-42a5-b872-890ebefc6b7d",
    "name": "wechaty.js.org",
    "status": "initializing",
    "verification_data": {
      "status": "pending"
    },
    "validation_data": {
      "status": "initializing",
      "method": "http"
    },
    "certificate_authority": "google",
    "created_on": "2025-11-14T21:25:59.70087Z"
  },
  "success": true,
  "errors": [],
  "messages": []
}

# GET (pending)
{
  "result": [
    {
      "id": "f29c763d-99b8-42a5-b872-890ebefc6b7d",
      "domain_id": "f29c763d-99b8-42a5-b872-890ebefc6b7d",
      "name": "wechaty.js.org",
      "status": "pending",
      "verification_data": {
        "status": "active"
      },
      "validation_data": {
        "status": "pending",
        "method": "http"
      },
      "certificate_authority": "google",
      "created_on": "2025-11-14T21:25:59.70087Z"
    }
  ],
  "success": true,
  "errors": [],
  "messages": [],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 1,
    "total_count": 1,
    "total_pages": 1
  }
}

# GET (succeed)
{
  "result": [
    {
      "id": "f29c763d-99b8-42a5-b872-890ebefc6b7d",
      "domain_id": "f29c763d-99b8-42a5-b872-890ebefc6b7d",
      "name": "wechaty.js.org",
      "status": "active",
      "verification_data": {
        "status": "active"
      },
      "validation_data": {
        "status": "active",
        "method": "http"
      },
      "certificate_authority": "google",
      "created_on": "2025-11-14T21:25:59.70087Z"
    }
  ],
  "success": true,
  "errors": [],
  "messages": [],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 1,
    "total_count": 1,
    "total_pages": 1
  }
}

The reason is that:

❌ CNAME Cross-User Banned — Error 1014

This error means:

A Cloudflare-managed DNS zone (js.org) is pointing a CNAME to another Cloudflare-managed hostname (pages.dev) in a different Cloudflare account — and Cloudflare is blocking this for security.

This is a hard restriction Cloudflare has for cross-account CNAMEs when the target does not explicitly allow it.

And Cloudflare Pages does NOT automatically whitelist domains that point to .pages.dev unless the domain is registered in the Pages project.

⚠️ You MUST add the domain to the Pages custom-domains API.
⚠️ Cloudflare will NOT automatically allow the CNAME.

This is why you are seeing Error 1014 even though DNS is correct.

Here's the original error message for documentation purpose - I believe there will be someone has the same issue in the future.

Error 1014 Ray ID: 99e97640382d1574 • 2025-11-14 21:04:33 UTC
CNAME Cross-User Banned
What happened?
You've requested a page on a website that is part of the Cloudflare network. The host is configured as a CNAME across accounts on Cloudflare, which is not allowed by Cloudflare's security policy.

Please see https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1014/ for more details.

What can I do?
If this is an R2 custom domain, it may still be initializing. If you have attempted to manually point a CNAME DNS record to your R2 bucket, you must do it using a custom domain. Refer to R2's documentation for details.


Visit our website to learn more about Cloudflare.

@MattIPv4
Copy link
Member

That feels like an AI answer, and it's not really correct, though your script is. Cloudflare Pages needs to know what domains to respond to, and you need to add a js.org subdomain via the API specifically because the UI has an additional public suffix list check that the API doesn't. This guidance is in our wiki: https://github.com/js-org/js.org/wiki/3rd-party-hosts

@indus
Copy link
Member

indus commented Nov 15, 2025

totally forgot about the info in the wiki 🤦‍♂️
Nevertheless - Welcome back https://wechaty.js.org

@indus indus merged commit db46615 into js-org:master Nov 15, 2025
11 of 14 checks passed
@indus indus removed the error The page requested returns an error label Nov 15, 2025
@huan
Copy link
Contributor Author

huan commented Nov 22, 2025

Thank you @MattIPv4 @indus , appreciate your help!

Have a great weekend. Cheers! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change This PR/issue is regarding making a change to an existing subdomain external page This PR has a target of a site that isn't GitHub Pages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants