https://github.com/initdc/subdomain-redirect
Redirect service by access subdomain, powered by Cloudflare Workers and KV DB
https://github.com/initdc/subdomain-redirect
clouflare database kv redirect subdomain workers
Last synced: 7 months ago
JSON representation
Redirect service by access subdomain, powered by Cloudflare Workers and KV DB
- Host: GitHub
- URL: https://github.com/initdc/subdomain-redirect
- Owner: initdc
- License: mit
- Created: 2021-04-25T16:02:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-27T06:52:11.000Z (about 4 years ago)
- Last Synced: 2025-01-20T23:48:31.896Z (9 months ago)
- Topics: clouflare, database, kv, redirect, subdomain, workers
- Language: JavaScript
- Homepage: https://moz.one
- Size: 244 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# subdomain-redirect
> Redirect service by access subdomain, powered by Cloudflare Workers and KV DB
## Notice
- Only 2nd level subdomains are supported.
> Because Cloudflare’s free SSL cert covered your domain and any 2nd level subdomain## Deploy
1. create a worker

2. paste the code from ```index.js```

3. set KV database binding

4. create records in KV database

5. set route for ```*.example.com```

6. create DNS record for ```*.example.com```

## Reference
[Configuring SSL for multiple subdomains](https://community.cloudflare.com/t/configuring-ssl-for-multiple-subdomains/11771)
## Powered by
[Cloudflare Workers](https://workers.dev/)
## License
MIT