- Configure an AI edge with a GitHub Page as the origin
- Add custom hostnames, URL path rewriting, and enforced redirect
- Update your DNS records to complete the endpoint redirect
- A Datum Cloud Account
- A GitHub page site (note: these same steps can be followed using any third-party page site)
- A live domain (in this guide example, it is managed in Cloudflare)
Create an AI Edge with the GitHub Page Origin
Login to your Datum Cloud Account. If you don’t have an account, create one for free. In the Datum Cloud Console. Navigate to AI Edge and add a new AI Edge. Set the origin to your GitHub page-based URL.Add the Hostnames
We’ll need to know which host headers to accept and route through our edge. To do this, add both the apex domain and the www subdomain as hostnames in the console. cloudvalid.com www.cloudvalid.comAdd a Custom URLRewrite
To load the site from the GitHub repo, we’ll need to rewrite the request to include / as a prefix before forwarding to the origin. In the HTTPRoute configuration, add a URLRewrite filter with a replacePrefixMatch rule. filters: - type: URLRewrite urlRewrite: path: type: ReplacePrefixMatch replacePrefixMatch: /cloudvalid.comAdd a Force Redirect
To canonicalize traffic and ensure traffic is properly routed, add a permanent 301 redirect rule. rules: - matches: - headers: - name: Host value: cloudvalid.com filters: - type: RequestRedirect requestRedirect: hostname: www.cloudvalid.com statusCode: 301Place the redirect rule before the URL rewrite rule in your route so apex requests are redirected without being rewritten first.
Verify the Proxy
Confirm the Edge is working correctly by sending a request directly to the Datum Cloud proxy URL with a host header override. Terminal: http://0dbfa9aa6b1b4c739f99382f405d4ac5.datumproxy.net host:www.cloudvalid.com You should receive a 200 OK response with the HTML content of your GitHub Pages site. If you see a 404, double-check that the replacePrefixMatch value in Step 3 matches the exact path GitHub Pages uses to serve your site.Update DNS Records
With the edge verified, it’s time to point your domain’s DNS at Datum Cloud’s IPs. This is a two-part change: first remove the existing A records, then add new ones pointing to the Datum Cloud IP addresses.Remove existing apex A records
In your Cloudflare dashboard, navigate to the DNS settings for cloudvalid.com and delete the two existing A records on the apex domain (@ / cloudvalid.com). These are likely pointing to your previous host or GitHub Pages’ own IPs.Add Datum Cloud A records
Create two new A records for the apex domain pointing to Datum Cloud’s anycast IPs: Cloudflare DNS — A records Record 1 Type: A Name: @ (cloudvalid.com) Content: 67.14.168.1 Proxy: DNS only (orange cloud OFF) Record 2 Type: A Name: @ (cloudvalid.com) Content: 67.14.164.1 Proxy: DNS only (orange cloud OFF)Set the Cloudflare proxy status to DNS only (grey cloud). Enabling the Cloudflare proxy (orange cloud) in front of Datum Cloud would double-proxy your traffic, which is unnecessary and may cause TLS or header issues.