Jump to content

[Solved] How To Create Subdomains (Subdomains Don't Work)


Recommended Posts

Posted

Hello Heliohost,

 

I understand what a subdomain is, but I have difficulties creating a subdomain.

 

Example,

If I created a subdomain "keepit", keepit.misc314.com will not work. My browser returns server error.

However, visiting misc314.com/keepit works.

 

How I create my subdomains:

 

1. In cPanel, click 'Subdomains'

2. Type in 'keepit' and choose my domain as 'misc314.com'. The path is automatically generated.

3. Press the OK button and received a successful message.

4. I do not use any redirections.

 

I have tried creating several domains to date, but none of them worked, with the exception of one: http://secure.misc314.com

My almost one year old subdomain still doesn't work, so it can't be that DNS lag thingamajig.

 

I really appreciate if anyone could point out where I went wrong. I am on Stevie btw.

Thank you very much.

Posted

Change your nameservers to ns1.heliohost.org and ns2.heliohost.org and try again. Cloudflare is likely to blame for this not working.

Posted

Go to your CloudFlare DNS settings. Then create an A record with the name of your subdomain (e.g. "keepit") and point it to 216.218.192.170.

Posted

Thank you for your inputs :) Perhaps I'll try to skip CloudFlare some other days.

 

While I started using CloudFlare only last year, I have been experiencing this issue right from day one. Subdomains have never worked for me (with exception of secure.misc314.com) and weirdly they are treated as a folder. Accessing misc314.com/secure/ gives an error so this hints that a subdomain shouldn't function as a normal directory. Thus I infer that all other subdomains (eg keepit.misc314.com) aren't, for some reasons, set up correctly as they can be accessed using misc314.com/keepit/

 

I have tried setting up A record as per nylen's suggestion, but I have it pointing to 64.62.214.2 (my website IP) instead. This didn't work.

 

Any other suggestions are appreciated :)

Posted

Subdomain folders are normal, though you should be able to access them as proper subdomains as well.

 

For instance, I have http://raxdev.raxsoft.com, which is the same as http://raxsoft.com/raxdev/ There are ways to structure a site so this doesn't happen, but your main domain will typically have such folders for subdomains on it.

 

I'll escalate this for you. If it never worked before you had CloudFlare, it likely isn't caused entirely by CloudFlare (though it may very well compound the problem). Krydos is likely going to ask you remove CloudFlare and switch to our servers anyway though, as nameserver issues are a common cause of this type of issue.

Posted

I have tried setting up A record as per nylen's suggestion, but I have it pointing to 64.62.214.2 (my website IP) instead. This didn't work.

My browser is redirected from keepit.misc314.com to www.keepit.misc314.com.

The server just can not be found, because www.keepit.misc314.com is still unknown.

Maybe this helps

Posted

The problem is with your /home/misc314/public_html/.htaccess file. I renamed it .htaccess-old so you can see that when you click the link http://keepit.misc314.com/ it displays correctly. You may also need to clear your browser cache since .htaccess files tend to get cached. Let us know if you need any additional help.

Posted

Thank you Krydos <3 It now works. Funny that in my trial I, too, renamed it and clear cache / use another browser but it didn't work. Perhaps I didn't allow enough time for changes to take effect?

 

Anyway, thanks for pointing out the issue and thanks to wolstech and nyten too :)

 

 

 

 

UPDATE: (For closing)

 

Turns out my .htaccess was really badly written. It would redirect anything to include www, and this includes any subdomains. I believe it's interfering with the default actions, so at times keepit.misc314.com would redirect to www.keepit.misc314.com/keepit/ and other times it would just fail.

 

Now Krydos has pointed out the error, the sub domains work and /keepit/ is no longer accessible as I hope it would be.

 

 

I've also rewritten my htaccess to play nice with subdomains and it works. I've added back CloudFlare and 10 minutes later, all my sub domains works after initially getting server error. I've also discovered some sub domains appear to work even without adding A record in CloudFlare, although I personally advice against it.

 

Thanks to everyone once again. I've learnt a lot.

Posted

Thanks for the update. To some people it may seem like a waste of time to post again after the issue is resolved, but thousands upon thousands of people browse this site to find solutions to their own similar issues. When you post a final update like that it may end up helping all sorts of people down the road. If they find this thread it may even mean they don't have to post their own support request and that makes the administrators jobs even easier. Thanks!

  • Like 1
Guest
This topic is now closed to further replies.
×
×
  • Create New...