Playing
05. DNS records for the WebSocket subdomain

Transcript

00:00
Once you've toggled Reverb on your server and it's technically running, we need to point our DNS for that subdomain to our primary domain. So we're going to head back over to wherever we're managing our DNS. And we're going to add a CNAME record in here now.
00:14
So let's add a CNAME record for the WS subdomain. And of course, change that if you switch that up. And for the target here, I'm just going to set that to app, which is just going to go through to the root domain.
00:26
Let's go ahead and save this out. And we'll wait for that to finish. We'll also, for the purpose of this, just get rid of the proxy through Cloudflare and just use that as DNS only.
00:35
Once you've done this, you'll want to verify that the CNAME has been hooked up properly. So we could just go ahead and ping this. Let's ping ws.alex.gs and just wait for that to finish.
00:45
And we should see this come through. Once we've done that, we know that the CNAME has been hooked up correctly to point through to our server. Just verify that the IP address is the same here in case you have
00:55
any old records lying around. And that is it. We've hooked this up now, and we now have that subdomain ready to handle our WebSocket connections.

Episode summary

In this episode, we tackle setting up the DNS records for our WebSocket subdomain. Now that you've got Reverb running on your server, it's time to make sure requests to your WebSocket subdomain (like ws.yoursite.com) actually end up at the right place.

We'll walk through how to add a CNAME record for your WebSocket subdomain in your DNS provider's dashboard. This usually means setting something like ws pointing at your main app or root domain. Simple stuff, but very important!

We'll also talk about disabling any HTTP proxying (like Cloudflare's orange cloud) so your WebSocket connections aren't interrupted—just set this to DNS Only. Finally, we'll show how to verify everything is working by pinging your new subdomain and double-checking the IPs line up. Once this is done, your subdomain is all set to start handling WebSocket connections!

Episode discussion

No comments, yet. Be the first!