External DNS for Custom Domain Configuration Questions

Hi everyone,

I was hoping someone could help this complete beginner figure this out.

I created a browser-based game and got it hosted onto Netlify, and Netlify gave me one of their autogenerated names. I also have a website (with Wix). It’s fourseaterescapes.com. I’ve embed the game into one of the pages: fourseaterescapes.com/feralcabin (this subpage is not live yet, but it does play smoothly when tested).

My concern is that I intend this to be a paid game, accessed only on my site by paid membership. I can code the game to “Domain Lock” it so that it only plays if it’s loaded in a website that I define. I don’t know how this works if the game is an embed game hosted via Netlify.

Do I domain lock it to my website or to "randomgame.netlify.app? Obviously, I don’t want people bypassing my website and going straight to randomgame.netlify.app and playing it for free. That’s how I ended up at “configuring an external DNS for a custom domain.”

Is that the correct way to tackle this?

Do I change randomname.netlify.app to fourseaterescapes.com/feralcabin?

If I point my subdomain to Netlify, can I do it for just one page of my website? Does the entire fourseaterescapes.com/feralcabin subpage load via Netlify, or can I still make it embed?

Also, I see in the Netlify documents guide some examples of subdomains being something like “blog.petsofnetlify.com” but never “petsofnetlify.com/blog” and not sure if that difference effects this process.

Ultimately, I just want to make sure the actual game URL is hidden or otherwise unplayable unless it’s within my website.

I know that was a bunch of questions, but this situation has got me stumped.

Thanks so much for your help!

Bill

Hi @castorncage

This is probably best achieved by having the game as part of your website, rather than a separate site.

The former (blog.petsofnetlify.com) is a subdomain. The latter (petsofnetlify.com/blog) is a path within a domain. Consider petsofnetlify.com like the hard drive of a computer, and blog is a directory within it. If your site (fourseaterescapes.com) was hosted on Netlify, you could use a rewrite to map /feralcabin to the game site on Netlify. I don’t know Wix offers such functionality.

It is not possible to make a change such as this. You can set fourseaterescapes.com as a custom domain for randomname.netlify.app, but that would mean having the site on Netlify and not Wix.

Likely (given that mentioned above) you would need to embed the Netlify site into this page. You might then look at CSP and X-Frame-Options options to limit where users can access the site from. There are various visitor access control methods with Netlify in such as Netlify Identity and Password protection (not available on all plans.)

I cannot say overall if this will work as I have not tried it but hopefully this gives you something to work from.

(Happy to stand corrected on anything written above.)

2 Likes

Thanks coelmay for the fast and detailed response! I’ll take some time to digest this and see where to go from here. Have a great day!

1 Like