Accessing the website directly with the domain and not with the Subdomain, Via CF Tunnel
Want to ask a question,
I want to setup a Webserver
and I want to use the Zero trust Tunneling Services of CloudFlare
I have a domain too
when I tried to see tutorials on YT
They Showed these steps in short
1. Created a Cloudflare Account
2. Bought a Domain
3. Changed the Nameservers
4. Installed Cloudflare ZeroTrust Client in the Server Machine
5. Created a hostname which contained total of 4 fields
6. The First Field is "subdomain (optional)", 2nd is "Domain", Third is the "type", and lastly the 4th one is "URL"
7. in the First Filed every tutorial have a subdomain name, in the second the usual Domain, in the Third the type of protocol, HTTP and lastly in the 4th filed they gave the IP address and port on which the website is running
My problem is:
I don't want to access my website via the subdomain.
My Questions is:
Can I Directly point my website to the Domain directly without the need of the subdomain?
5 Replies
The subdomain (optional) field is optional, just leave it blank
You Sure it will work?
@Chaika
yes, the optional field is optional
people put stuff on subdomains to not mess with their main domain
So Since I have to setup Multiple Websites
I need to add all my domains for each website in CF and when
Adding the Hostname, I have to select the Domain and leave the Subdomain Empty every time
but another thing is
if I setup Website A on port 80 and also Website B on port 80 also and then in hostname Choose Different Domain But The URL Field Will be Same
Will it clash or Do I need to assign different port to both the website like
Website A on port 80 and Website B on port 81
@Chaika Can you help me answer this
if I setup Website A on port 80 and also Website B on port 80 also and then in hostname Choose Different Domain But The URL Field Will be Same Will it clash or Do I need to assign different port to both the website like Website A on port 80 and Website B on port 81You will not be able to have two things running on the same port. Either: 1. Use NGINX with a reverse proxy to proxy the two ports (Let's say 8080 and 8081) to port 80 under different hostnames. Or 2. There's an option to add a port, so instead of like
127.0.0.1
or what ever you have it set as, you do 127.0.0.1:8080
and 127.0.0.1:8081