Software Development
Domain Naming System
How to own a public IP and a domain name.
ClaudFlare
A standard domain name system (DNS) provider.
| Record | Name | What it does | Example |
|---|---|---|---|
| A | Address | Maps a domain to an IPv4 address. | google.com -> 142.250.190.46 |
| AAAA | IPv6 Address | Maps a domain to an IPv6 address (the long ones). | google.com -> 2607:f8b0... |
| CNAME | Canonical Name | An alias. Maps one domain name to another. | blog.me.com -> hashnode.network |
| MX | Mail Exchange | Tells the world where to send your emails. | me.com -> mail.google.com |
| TXT | Text | Used for verification (SPF, DKIM) or notes. | "v=spf1 include:_spf.google..." |
| NS | Name Server | Tells the internet who is in charge of this DNS. | ns1.cloudflare.com |
Subdomain is a domain name that is a part of a domain name. For example, if you have a domain name example.com, you can create a subdomain www.example.com with www prefix.
Cloudflare Tunnel
A quick way to route localhost port to public.
- Purchase a cloudflare domain, install cloudflare on pc
winget install --id Cloudflare.cloudflared
# At user/.cloudflared
cloudflared --version
Setup credentials and configuration file. Setup tunnel from cloudflare documenations. Connect https://website.domainname.com to connect to http://localhost:8080 and https://app.domainname.com to connect to http://localhost:5555 though tunnel.
tunnel: <tunnel-id>
credentials-file: <credentials-path>
ingress:
- hostname: <website.domainname.com>
service: http://localhost:8000
originRequest:
noTLSVerify: true
connectTimeout: 30s
httpHostHeader: localhost:8000
- hostname: <app.domainname.com>
service: http://localhost:6666
- service: http_status:404