pinacoladaxb Posted December 23, 2008 Share Posted December 23, 2008 Since I am asking this question, I honestly don't know if it has anything to do with php... But if I'm hosting a server on my ip, how can I set up a redirect so that rather than typing in my ip, people can connect to my server using something like "server.atomicriot.com"? In other words, I want to do exactly what http://www.dyndns.com/ does, but using MY domain instead of theirs. If this doesn't make sense, let me know. Thanks, Adam Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/ Share on other sites More sharing options...
redarrow Posted December 23, 2008 Share Posted December 23, 2008 Well if you got a static ip then yes it worth setting up a php server and dns properly. but if you got a dynamic ip then forget it. just use the dns service you have provided here as a example. Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-722720 Share on other sites More sharing options...
pinacoladaxb Posted December 23, 2008 Author Share Posted December 23, 2008 Well if you got a static ip then yes it worth setting up a php server and dns properly. but if you got a dynamic ip then forget it. just use the dns service you have provided here as a example. Yes; I have a static ip and a port forwarded for my server and everything. I just need to know how to be able to use a web address interchangeably with my ip. Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-722728 Share on other sites More sharing options...
Mchl Posted December 23, 2008 Share Posted December 23, 2008 You need to register your domain first. Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-722750 Share on other sites More sharing options...
pinacoladaxb Posted December 26, 2008 Author Share Posted December 26, 2008 You need to register your domain first. I have already registered the domain and everything. Will someone please actually answer the question? Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-723840 Share on other sites More sharing options...
chronister Posted December 26, 2008 Share Posted December 26, 2008 On your domain registrar, you will give your domain an A record. The A record is the IP address that your domain translates to. Once you have entered your static IP as the A record, then after a while of DNS refreshes through the DNS community you will be able to bring up a command prompt and do ping www.yourdomain.com it should return your static IP address as the responding address. Your server must be set up to respond to that name. If your server is configured to respond to that name, and serve the proper content for that name and your registrar is configured with the proper A record, then voila, www.yourdomain.com gets served from your home server. And you DON'T have to have a static IP to do this. I have used a service called ZoneEdit.com (free with limits) to handle my dynamic DNS needs. Coupled with a program called Direct Update (not free) as soon as your IP changes (configurable), it will log into zonedit.com (and many many more) for you and update your IP address. Did this for a while when I was just starting out in the big bad world of web development. Just to further clarify in case others want to try this..... To do this with Dynamic IP, you register with ZoneEdit.com and they give you the IP address you need to use for your A record, you set that up with your registrar and then your domain name points at their system. They then push any requests for your website to your dynamic IP in real time. It would work seconds after updating the IP. Very cool service I might add. Sort of off topic..... Direct Update is a very cool program. If you look in the program directory you will find the plain text files for all the services it works with. I was able to create a new one with a custom setup. I was then able to create some scripts to form a control panel for the company I worked for who had 60+ locations. This control panel holds the IP addresses of all the stores (scattered over 6 states), so that the IT director could have the IP address within 5 minutes of changing and remote manage the stores. Many locations had static IP's, but many did not. Direct update would call up a file on our webserver and pass the name of the store and IP into the script, the script would then update a database with the proper information. Pretty nifty setup I thought. Nate Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-723873 Share on other sites More sharing options...
pinacoladaxb Posted December 29, 2008 Author Share Posted December 29, 2008 I use HostMonster. I went to the control panel and there is nothing about an "A record," but there is something about being able to purchase a "Dedicated IP Address," which would assign a unique IP to your site: "An IP address is a number like 234.123.66.7 that identifies the unique server where your website can be found. In shared hosting, you share the same IP address as other web sites on your server. By upgrading to a Dedicated IP address, you can enable your site for e-commerce and other advanced capabilities, and minimize the risk of being impacted by other sites on your shared server." Is that what I am looking for? Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-725193 Share on other sites More sharing options...
Mchl Posted December 29, 2008 Share Posted December 29, 2008 I suggest you ask HostMonster's support about your issue. I used a hosting once, that did all configuration regarding domains, only by email request. Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-725194 Share on other sites More sharing options...
chronister Posted December 29, 2008 Share Posted December 29, 2008 Are you wanting to host the site on your home computer?? If so they you have to contact your registrar (hostmaster) and find out from them how to change your A record. An A Record as defined by wikipedia is: Returns a 32-bit IPv4 address, most commonly used to map hostnames to an IP address of the host, but also used for DNSBLs, storing subnet masks in RFC 1101, etc. If your wanting to host the site on your home PC, then the A Record needs to point to your home static IP. If your registrar is also your web host, then they will handle the A record. But either way, you have to contact them on what is what. Nate Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-725556 Share on other sites More sharing options...
MatthewJ Posted December 29, 2008 Share Posted December 29, 2008 You just need to ask your host/domain registrar how point your domain name at the server they host for you... You pay them for a reason, make them answer your questions Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-725608 Share on other sites More sharing options...
pinacoladaxb Posted December 30, 2008 Author Share Posted December 30, 2008 Thanks Mchl, chronister, and Matthew3. I sent hostmonster an email and they changed my a record for server.atomicriot.com. Is there any way to test if it worked? Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-726384 Share on other sites More sharing options...
Daniel0 Posted December 30, 2008 Share Posted December 30, 2008 Thanks Mchl, chronister, and Matthew3. I sent hostmonster an email and they changed my a record for server.atomicriot.com. Is there any way to test if it worked? Ping the hostname and see if it resolves to the correct IP address. Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-726395 Share on other sites More sharing options...
chronister Posted December 30, 2008 Share Posted December 30, 2008 Or you can just go to the domain name and see if you get the website that you are expecting. Nate Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-726400 Share on other sites More sharing options...
pinacoladaxb Posted December 30, 2008 Author Share Posted December 30, 2008 Well I'm away from home right now, and I don't expect anything to show up when I go to the address. So what should I do? I'm using a mac, so I'm a little disoriented. How can I find out if the address server.atomicriot.com corresponds with my home ip? Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-726406 Share on other sites More sharing options...
Daniel0 Posted December 30, 2008 Share Posted December 30, 2008 Open the terminal and type: ping server.atomicriot.com The address resolves to 71.60.197.242, so if that's the right IP address then it works. The machine on that IP address does not respond, however. If you don't know your home IP then you can see it at a site like whatismyip.com. Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-726417 Share on other sites More sharing options...
pinacoladaxb Posted December 30, 2008 Author Share Posted December 30, 2008 Thanks Daniel0. It looks like it resolves correctly. However, I do not expect it to respond unless you connect to port 6121. Thanks again everyone. Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-726438 Share on other sites More sharing options...
chronister Posted December 30, 2008 Share Posted December 30, 2008 Yes, server.atomicriot.com:6121 responds. There is nothing there, but it does present a page. And I can telnet into it. There obviously is nothing responding but it connects. Nate Quote Link to comment https://forums.phpfreaks.com/topic/138236-solved-how-to-redirect-examplemysitecom-to-an-ip-address/#findComment-726525 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.