spscwork Posted September 5, 2012 Posted September 5, 2012 Hello all, I am trying to link two websites in such a way that by using a subdomain of one I can access the files on the second. For example, I want to be able to get: http://www.second.com/dir/index.html From: http://sub.first.com/dir/index.html I can use DNS Zone editors to make records (on the first I can make A, CNAME and TXT records and on the second I can make A, MX, AAAA, CNAME, HINFO, NAPTR, NS, PTR, RP, SRV and TXT records). Also, please could you tell me a good place to learn how to do this type of thing in the future. Thank You,Scott
Shinryuu Posted September 5, 2012 Posted September 5, 2012 You could just redirect the sub.second.com/dir/index page to the first.com/dir/index page in cPanel, assuming both sites are registered in your cPanel. Another idea would be to use frames, which would let you load sub.second.com/dir/index and first.com/dir/index in one page.
spscwork Posted September 5, 2012 Author Posted September 5, 2012 Sorry, I wasn't clear. I want to be able to access everything on second.com from sub.first.com, not just webpages but directories, images and everything else. Also the two accounts are from different providers (the first is from HelioHost and the second is from 1freehosting.com), I am trying to make this set up work as as 1freehosting provides just under 10GB disk size and I am running out of space on the HelioHost account. However 1freehosting caps the amount of email address, databases etc that you can have, therefore the two accounts, when put together in the afore mentioned way provide an ideal environment.
Ice IT Support Posted September 5, 2012 Posted September 5, 2012 You may set a CNAME record for sub.first.com with the value of second.com
spscwork Posted September 5, 2012 Author Posted September 5, 2012 I have set up a CNAME record, but now sub.first.com redirects to: http://redirect.main-hosting.com/error404.php/1
spscwork Posted September 6, 2012 Author Posted September 6, 2012 first.com: spow.tksecond.com: spow.hostingsiteforfree.com I would like something like space.spow.tk to have access to all of the files and directories in spow.hostingsiteforfree.com
Shinryuu Posted September 6, 2012 Posted September 6, 2012 Is the CNAME record: www.space.spow.tk IN CNAME www.spow.hostingsiteforfree.com and have A records: www.spow.hostingsiteforfree.com IN A 31.170.163.241 || || 64.191.115.234 || || 173.192.183.247 || || 31.170.164.249 should work for you. Note: || means "ditto", since you said your other site is hosted by 1fh, those are ns1-ns4 IPs for 1freehosting.com.
Ice IT Support Posted September 6, 2012 Posted September 6, 2012 If Shinryuu's method does not work, it is possible 1freehosting filters domains not pointed to their nameservers. Unfortunately, HelioHost does not support setting NS records for domains. You may need to add or park space.spow.tk in 1freehosting's cPanel, although CNAME records should not be causing such behavior. Be sure you are setting DNS records for space.spow.tk AND www.space.spow.tk and allow up to 24 hours for DNS to fully update.
spscwork Posted September 6, 2012 Author Posted September 6, 2012 Thank you so much for all of your help, but please could you explain further:Am I meant to set up the CNAME record in the DNS Zone Editor of the HelioHost account or the 1FreeHostng account;Also, in the 1FreeHost account there are four NS records which read: spow.hostingsiteforfree.com. IN NS ns1.1freehosting.com. spow.hostingsiteforfree.com. IN NS ns2.1freehosting.com. spow.hostingsiteforfree.com. IN NS ns3.1freehosting.com. spow.hostingsiteforfree.com. IN NS ns4.1freehosting.com. Would this suffice or do I still need to put in the A records and if so in which account do I put them in. Thanks Again
Shinryuu Posted September 7, 2012 Posted September 7, 2012 The A records are for the HH account, the HelioHost account's CNAME record will point the subdomain to the 1fh-hosted main domain's URL, but the way CNAME works is by pointing one URL to another, the nameserver then checks the A records for the pointed-to URL, which with those A records would tell the HH ns to pass the request to 1fh's nameservers, without them the HelioHost ns has no idea where the second URL is located.
spscwork Posted September 10, 2012 Author Posted September 10, 2012 Thank you so much, everything is working absolutely perfect. Thank you again!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now