Point subdomain to IP and port

dash-dns
#1

I have a Rocket.Chat install running on port 3000 and I want to add a subdomain (chat.mydomain.com) that redirects to Rocket.Chat (x.x.x.x:3000).

Is this possible? if so, how would I go about this? (Free plan)

#2

Create a Page Rule, set the URL to chat.mydomain.com/*, enter the destination URL (http://x.x.x.x:3000) and choose either a 301 or 302 type redirect.

1 Like
#3

Thanks for the quick reply,
Does it just take time to start working?

#4

Just did a test, and seems to be instant:

michael$ curl -i https://chat.mkie.cf/ 2>&1 | egrep "location|HTTP"
HTTP/2 302 
location: https://192.0.2.1:3000
1 Like
#5

Hmm, cause it’s not working for me

just shows chromes “Site cannot be reached”

#6

See Using page rules to perform redirects

Try creating a “A” DNS record with the name/subdomain “chat” and set the value to 192.0.2.1.

3 Likes
#7

The dummy NS record hack seems redundant to most users (they think CF handles all DNS related work, which is not true here). It can be automated.

#8

Thank you so much! It works now!