2

I've set up a local server running XAMPP. Localhost is working for the server, and I've forwarded port 80 on our router to allow for incoming connections. This also works. So I can now access my hosted webpage through the IP adress of our external IP.

We already have a domain hosted, and cPanel installed on another server that the domain is managed by (this is not our server, it's a paid hosting solution).

How do I set up cPanel so that I can "redirect" subdomain folio.site.com to the locally hosted website?

Simply creating a subdomain and a forwarder will forward the user to the correct place, but then the URL changes to the IP adress, which does not look pretty.

I simply want the URL to stay at folio.site.com while in the root there, and if you navigate to another page there (for example /projects.php) then the URL would read this: folio.site.com/projects.php

I guess this is what A records or CNAME records do? But I cant get it to work. Or I don't really understand it =)

Thanks for any help! =D

1 Answer 1

1

How do I set up cPanel so that I can "redirect" subdomain folio.site.com to my other locally hosted website?

As you likely already suspect, this wouldn't really be a "redirect", it's pointing a subdomain to an IP address, which is done with an A record. A CNAME would be used to point to a hostname, not an IP address.

To do this in cPanel, edit the DNS Zone for your domain (e.g., site.com) and add an A record for:

folio.site.com 14400 IN A <external_IP_of_XAMPP_server>
4
  • I've added A records like that, but nothing happens. Or rather, what ahppens is it's doing a regular redirect. =/ So it only swaps out the url with the IP. And I cant see the A record in my list. I see autodiscover.folio.site.com and autoconfig.folio.site.com and several more like that, but no only folio.site.com Sep 4, 2013 at 8:50
  • You'll need to wait for the DNS modifications to propagate, up to 72 hours.
    – dan
    Sep 4, 2013 at 8:53
  • I manage the DNS in cPanel. I removed all my entires to the subdomain and "A Record", and just wanted to see what happened in IE. In IE, it actually worked! But I've now removed the entries, so I've added it again and I'm waiting to see if it works. Firefox however was stuck at actually redirecting me and showing the IP, but IE worked in showing the subdomain URL Sep 4, 2013 at 9:13
  • OK, thanks for the update. You might try clearing all the cache in Firefox and opening another browser. The DNS changes are going to take time to propagate, so don't expect for it to resolve completely right away.
    – dan
    Sep 4, 2013 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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