Cannot access addon domain via domain name
Hi guys,
Please Assist as I am lost.
I have main domain (examples):
example1.rs
I added another domain example2.rs.
Since I created new document root (/public.html/example2) I had to created addon domain and subdomain example2.example1.rs.
Now when I want to access website on example2.rs I cannot, I can only access it via example2.example1.rs
How can access site just via example2.rs?
-
This should work by default once the addon domain is setup. What, if anything is in the .htaccess? 0 -
Thanks for quick reply. On many sites I read it should be automatic but for me it is not. I tried couple of times. In .htaccess I have RewriteEngine on RewriteOptions inherit RewriteCond %{HTTP_HOST} ^example2\.rs$ [OR] RewriteCond %{HTTP_HOST} ^www\.example2\.rs$ RewriteRule ^/?$ "https\:\/\/example2\.rs\/" [R=301,L] 0 -
That rewrite should just redirect example2.com or so I don't foresee it causing this issue - trying to perform a curl request for the original domains you added and I noticed that neither of them seem to resolve. When you perform a curl request for the addon domain as follows: curl -vvI domain.rs
what is the output? (ensure you remove any identifying information before adding here)0 -
Hi, many thanks for helping me out * Rebuilt URL to: example2.rs/ * Trying 195.252.xxx.xxx... * TCP_NODELAY set * Connected to example2.rs (195.252.xxx.xxx) port 80 (#0) > HEAD / HTTP/1.1 > Host: example2.rs > User-Agent: curl/7.55.1 > Accept: */* > < HTTP/1.1 301 Moved Permanently HTTP/1.1 301 Moved Permanently < Server: nginx Server: nginx < Date: Tue, 24 Mar 2020 19:48:34 GMT Date: Tue, 24 Mar 2020 19:48:34 GMT < Content-Type: text/html; charset=iso-8859-1 Content-Type: text/html; charset=iso-8859-1 < Content-Length: 227 Content-Length: 227 < Connection: keep-alive Connection: keep-alive < Location: < Set-Cookie: _mcnc=1; Max-Age=2; Path=/ Set-Cookie: _mcnc=1; Max-Age=2; Path=/ < X-Microcachable: 0 X-Microcachable: 0 < Set-Cookie: uid=w/xutF56ZBJfrzxhAwuaAg==; expires=Thu, 23-Apr-20 19:48:34 GMT; domain=$host; path=/ Set-Cookie: uid=w/xutF56ZBJfrzxhAwuaAg==; expires=Thu, 23-Apr-20 19:48:34 GMT; domain=$host; path=/ < P3P: policyref="/w3c/p3p.xml", CP="CUR ADM OUR NOR STA NID" P3P: policyref="/w3c/p3p.xml", CP="CUR ADM OUR NOR STA NID" < * Connection #0 to host example2.rs left intact 0 -
That's resolving the domain without issue (not the subdomain) - Can you confirm that the same thing occurs when you go to the domain over https or when you remove the redirect? To confirm, has the new domain been issued an SSL certificate? 0
Please sign in to leave a comment.
Comments
6 comments