Created a tool for a website

I created a tool for gaming, and instead of the main domain (omggamer.com), I want to host it in a subdomain like tool.domain.com, but the database should be the same so that people who subscribed to the main website can also access the tool. There’s a subscription plan for it.

How Can I do that?

This is to do with DNS, and the registrar you bought the domain from or manage it with, and even the TLD registry (who may wish to police spammers and other fraudsters). Not so much Python (but I’d love to know if any registrars support that, or have an API.

I think over http at least, it’s possible. I don’t know how much trickier it is to get the main domain omggamer.com to play well with https certs. But I see it’s verified already.

My understanding is that you should:

  • avoid wild card records because of sub-subdomain hijacking
    and you need to:
  • add CNAME to a different name, or A or AAAA records both for the custom subdomain, to a static I address.

This is obviously focussed on Github Pages, but I found it very helpful, and it’s super easy to make a Hello World for free with them:

I don’t know what the best way is to setup something that allows authentication from the main website to be used by another server on a sub domain but if you’re using a session cookie or browser cache, navigate carefully around the same origin policy.

1 Like

So this is possible with DNS, right? But then, there will be 2 different IPs? for a domain different and sub domain different. Will it impact the SEO? Before SEO, is it going to run the domain with 2 different IP?

Regarding the IPs and SEO, I don’t know. If wild guesses are useful nonetheless, I would look to see if it’s possible both to set a different port on a DNS record, and to configure https for that. Otherwise nginx or whatever primarily serves the requests could inspect the request header for the url the user entered, and adjust what it serves accordingly.