All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Weird behavior of Direct Admin
I have been searching for a while but I cannot find an answer for my problem.
I created a subdomain and everything went well, directories were created properly and everything seems fine until I open the subdomain on my browser. I got an error, upon close inspection I notice that the subdomain is redirecting wrong.
instead of subdomain.domain.tld it is redirected to www.subdomain.domain.tld
I am an Nginx guy so adding subdomain is a piece of cake. So what happens? Why is that it is behaving that way?
I also uncheck the Force SSL with https redirect cause I thought this is the error.
Site Redirects are empty.
What did I do wrong @DA_Mark ?
Does anyone experience this? How did you fix it?
Comments
I am reluctant to assist a traitor.
Not that I've helped anyone on LET ever.
Maybe non-www to www redirect is set in the control panel?
Check your redirection rules. Maybe you set something there
Probably the .htaccess file for your root domain which is followed in the sub domain because it’s document root is under the root, and htaccess is recursive.
@ViridWeb @jar @smtalk
I only have a simple .htaccess script.
I forgot to mention. I use custom directory for the subdomain. I don't want to see my sudomain under the root domain directory.
The root document path is
/domains/domain.com/public_html
The subdomain path is
/domains/domain.com/subdomain.domain.com
Interesting. Confirmed redirect via curl as well to rule out any browser oddities? Any chance a web app served there could be doing it?
@jar
404
>Not Found >
>The resource requested could not be found on this server!
>Not sure what happens. I still have this issue where my subdomain is being redirected to www.subdomain.domain.com
I'm thinking like a:
So like if I curl my site I see the redirect like:
Assuming you do as well, in which case it'll be time to dig deeper. If it's not user level and it's not htaccess, then I'm wondering if there's a global template customization on the server: https://help.directadmin.com/item.php?id=2
I get this result
If change the ip address to my Nginx server it works fine. I have opened a ticket to my provider I would like to check what is the error since I cannot open it.
Does DA have this behavior or just my browser messing with me? But how come my nginx server is fine? So weird. Hope @DA_Mark is active and checking this out.
thanks @jar
So that return suggests that the web server isn't doing a www redirect. That would suggest that either your web browser or web application is doing it. Sort of like how Wordpress will redirect to it's SITEURL value in the database, many web applications do that, some less obvious about where it's done than others.
Would that be that the subdomain is now pointing to a different web server in this case, and therefore not the same hosting data at all?
It does not.
My theory is shifting to the idea that it's because it isn't serving an application that's redirecting to www. Web application redirect sounds highly likely at this point. That's the redirect that would occur after headers.