My server doesn't have a static ip so every time I boot the server, I have to tell my friends which is the ip.

Now I have a web server I'm renting out for websites and testing, with port 80 opened (plus probably a few others I guess), so I'm wondering if there is a way to create a subdomain for example http://game.domain.com that would redirect to my other server automatically by using .htaccess so I could just change it there and my friends would only have one address to remember.

I'm just concerned that the game traffic will constantly pass through my webserver, like a proxy and lag everyone. Am I correct?

Is there a way to do this with the game being redirected then finally use the end IP address, kind of like a permanent redirect once the connection has been established?

  • 1
    You might want to look into dynamic dns for your game server. The idea behind it being that every time you boot it and get a new IP that it will update a DNS record so that the server name will be consistent and correct within a few minutes of server boot. I've not used it myself but it is designed for exactly the kind of thing you want to do. – Chris Dec 29 '17 at 9:48
  • 4
    I'm voting to close this question as off-topic because it is about server access and networking, not gaming. – Frank Dec 29 '17 at 13:01
  • I think SuperUser does networking. – DJ Pirtu Dec 29 '17 at 13:25
  • 1
    Thanks @Chris, I researched Dynamic DNS and was able to set an automatic service with their API to redirect a subdomain to my ever-changing IP. Thanks for the suggestion as well DJ Pirtu, I fixed my problem but I'll keep that in mind for next time :) – NaturalBornCamper Dec 29 '17 at 17:30

No you cannot.

What you are describing is exactly how a proxy server works. A standard web server will not give you enough control to set this up.


Ok, for people who might be looking into the gaming section to do this, it is possible. I did not use a web .htaccess redirect, but after a suggestion of @Chris, I checked out Dynamic DNS services.

I ended up finding dynu.com who offers free dynamic DNS service and the best part is that you don't have to install anything on your server!

They have an API so I rigged up a quick script to send a GET request including the server's IP to Dynu and it just updates automatically. If you wish to to the same, make sure to lower the TTL so it updates faster.

  • Downvote for the actual solution which fixed my problem... whoever troll did this, I'm sorry to say but you are very much useless to this community – NaturalBornCamper Jan 2 '18 at 7:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.