Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 212 lines 5.1 kB view raw view rendered
1# 🌐 Custom Domain Setup via DNS (Simpler Method!) 2 3## Method 1: Direct DNS Configuration (Recommended) 4 5Instead of going through the Workers dashboard, you can just add a CNAME record in your Cloudflare DNS settings. 6 7--- 8 9## Quick Setup (2 minutes) 10 11### Step 1: Open DNS Settings 12🔗 **Direct link:** https://dash.cloudflare.com/a23b54e8877a833a1cf8db7765bce3ca/aesthetic.computer/dns/records 13 14Or navigate manually: 151. Go to https://dash.cloudflare.com/ 162. Select **aesthetic.computer** zone 173. Click **DNS****Records** 18 19### Step 2: Add CNAME Record 20 21Click **"Add record"** button and enter: 22 23| Field | Value | 24|-------|-------| 25| **Type** | CNAME | 26| **Name** | `grab` (will become grab.aesthetic.computer) | 27| **Target** | `aesthetic-grab.aesthetic-computer.workers.dev` | 28| **Proxy status** | ✅ Proxied (orange cloud) | 29| **TTL** | Auto | 30 31Click **Save** 32 33### Step 3: Verify (wait ~30 seconds) 34 35```fish 36# Check DNS resolution 37dig grab.aesthetic.computer 38 39# Test the endpoint 40curl -I "https://grab.aesthetic.computer/icon/128x128/prompt.png" 41``` 42 43Expected response: 44``` 45HTTP/2 200 46content-type: image/png 47cache-control: public, max-age=3600 48``` 49 50**Done!** That's it! 51 52--- 53 54## Why This Works 55 56### CNAME Record Routing 57``` 58User Request: 59https://grab.aesthetic.computer/icon/128x128/prompt.png 60 61Cloudflare DNS resolves CNAME: 62grab.aesthetic.computer → aesthetic-grab.aesthetic-computer.workers.dev 63 64Cloudflare routes through proxy (orange cloud): 65Edge worker intercepts and serves request 66 67Response: 68PNG image data 69``` 70 71### Benefits of Proxied CNAME 72- ✅ Automatic SSL/TLS (Cloudflare handles certificates) 73- ✅ DDoS protection 74- ✅ CDN caching 75- ✅ Edge routing 76- ✅ No origin server needed 77 78--- 79 80## Alternative Method 2: Workers Dashboard 81 82If you prefer the Workers UI: 83 841. Go to: https://dash.cloudflare.com/ 852. Navigate to: **Workers & Pages****aesthetic-grab****Settings****Domains & Routes** 863. Click: **"Add Custom Domain"** 874. Enter: `grab.aesthetic.computer` 885. Save 89 90This does the same thing automatically (creates the CNAME record for you). 91 92--- 93 94## Comparison: DNS vs Workers Dashboard 95 96| Approach | DNS Settings | Workers Dashboard | 97|----------|--------------|-------------------| 98| **Speed** | ~30 seconds | ~2-5 minutes | 99| **Control** | Full DNS control | Automated | 100| **Steps** | Manual CNAME | Click button | 101| **Result** | Same! | Same! | 102| **Recommended** | ✅ Yes (faster, more control) | Also works | 103 104Both methods create the same DNS record and work identically! 105 106--- 107 108## Troubleshooting 109 110### DNS Record Not Showing Up 111**Wait:** 30 seconds, then refresh the DNS records page 112 113**Check:** 114```fish 115dig grab.aesthetic.computer 116``` 117 118Should show: 119``` 120grab.aesthetic.computer. 300 IN CNAME aesthetic-grab.aesthetic-computer.workers.dev. 121``` 122 123### Certificate Error 124**Wait:** 1-2 minutes for Cloudflare to provision SSL 125 126**Check proxy status:** Must be **Proxied** (orange cloud ☁️), not **DNS only** (gray cloud) 127 128### Still Getting 404 129**Verify worker is deployed:** 130```fish 131cd /workspaces/aesthetic-computer/grab 132npx wrangler deployments list 133``` 134 135**Test workers.dev URL directly:** 136```fish 137curl -I "https://aesthetic-grab.aesthetic-computer.workers.dev/icon/128x128/prompt.png" 138``` 139 140If workers.dev works but custom domain doesn't, DNS record may be incorrect. 141 142--- 143 144## Current DNS Records Reference 145 146Your aesthetic.computer DNS likely has records like: 147 148``` 149aesthetic.computer → A record or CNAME to main site 150www.aesthetic.computer → CNAME to aesthetic.computer 151feed.aesthetic.computer → CNAME to feed worker (if you have this) 152grab.aesthetic.computer → CNAME to aesthetic-grab.aesthetic-computer.workers.dev (ADD THIS!) 153``` 154 155--- 156 157## Complete Terminal Commands 158 159```fish 160# Add CNAME via Cloudflare API (if you prefer CLI) 161curl -X POST "https://api.cloudflare.com/client/v4/zones/a23b54e8877a833a1cf8db7765bce3ca/dns_records" \ 162 -H "Authorization: Bearer YOUR_API_TOKEN" \ 163 -H "Content-Type: application/json" \ 164 --data '{ 165 "type": "CNAME", 166 "name": "grab", 167 "content": "aesthetic-grab.aesthetic-computer.workers.dev", 168 "proxied": true 169 }' 170 171# Or just use the dashboard - it's easier! 😄 172``` 173 174--- 175 176## After Setup 177 178### Update PLAN.md 179Mark as complete: 180```markdown 181- [x] **Configure Custom Domain** ✅ CNAME added via DNS 182``` 183 184### Test Production 185```fish 186# Test custom domain 187curl -I "https://grab.aesthetic.computer/icon/128x128/prompt.png" 188 189# Test on live site 190curl -s "https://aesthetic.computer/prompt" | grep "og:image" 191``` 192 193### Monitor 194```fish 195cd /workspaces/aesthetic-computer/grab 196npx wrangler tail 197``` 198 199--- 200 201## Summary 202 203**Recommended Approach:** 2041. Go to DNS settings: https://dash.cloudflare.com/a23b54e8877a833a1cf8db7765bce3ca/aesthetic.computer/dns/records 2052. Add CNAME: `grab``aesthetic-grab.aesthetic-computer.workers.dev` (Proxied) 2063. Wait 30 seconds 2074. Test: `curl -I "https://grab.aesthetic.computer/icon/128x128/prompt.png"` 2085. ✅ Done! 209 210**Total time:** ~2 minutes (vs 5-10 minutes with Workers dashboard method) 211 212You have full control over your DNS and it's faster! 🚀