I have a site http://www.subdomain.mydomain.com where subdomains points to same domain.
I want to create the sub subdomain like http://www.subsubdomain.subdomain.mydomain.com.
Is it possible to do like this ?
I am able to do this on my local by doing changes in hosts file and site binding but when I am trying to do same on real domain name, it's not working ?
Related
I currently have the following website setup on Windows Server 2012 R2. The following website is catching all the traffic to the webserver and then adding a few URL rewrite rules, such as forcing HTTPS and appending www.
I want to add a second website under a subdomain of the above site and diferent source code. How do I go about it?
EDIT: I've created a second website with a binding to the subdomain but all traffic is being redirected to the first website, as setup above. Does the first website require a defined Host Name? If so, that's not possible because the code of the website above is handling about 100 domains. The content is loaded based on domain name. So probably adding a subdomain of one of the websites is not possible. Is someone able to clarify, please?
Just create a new website in IIS for example hostname site1.yourdomain.com and set the bindings and and point to website folder.
create a 2e website with hostname site2.yourdomain.com set bindings, and point to your 2e website folder.
and you can have a main site with hostname www.yourdomain.com or yourdomain.com
also set an ip if you want to bind to a specific ip only.
it is important to set the hostname.
I'm trying to route a subdomain media.xyz.com to another droplet in digialocean. My main domain xyz.com points to a different server correctly.
My zone record looks like this
# IN A 107.170.51.xx
www CNAME #
media IN A 107.170.52.xx
However this does not work and the sub domain (media.xyz.com) redirects to my main webserver.
I've read the digital ocean tutorial on this and I think I've set it up correctly. I've also looked over questions on SO and the general advice is to create a new A record.
Could anyone tell me if this approach should work..? Or is my understanding on how this should work incorrect..?
you need to add record for your subdomain like what explained here:
https://www.digitalocean.com/community/articles/how-to-set-up-and-test-dns-subdomains-with-digitalocean-s-dns-panel
so simply in your DO control panel under your domain, do the following:
Add A record --> write down your subdomain end up with dot like this: media.xyz.com.
and your droplet IP in the 2nd field next to that: 107.170.51.xx
try that and see if it works or not!!
I have a drupal site where I use the domain access module that works using inbound HTTP_HOST variable.I have to create some subdomain's also.To make this module work properly the $_SERVER['HTTP_HOST'] variable should have the domain name in it .But I am getting the ip address of our server.So my site is not working properly.I am getting the main site.But the subdomains are not working.All are pointing to the main site.
My site is on our server and we asked our host to point our domain name to 172.XX.XXX/drupal.Our subdomains are also pointed to 172.XX.XXX/drupal.
So when I type the domain name it is showing the site but the http_host has IP in it.We have a VPS host plan.What should I do to make it work properly.
Please help.
Thing looks very easy.
You are just required to tell your domain host provider to point all your sub - domains to 172.xxx. ip / drupal.
some examples.
a.yourdomain.com => actuall would point to 172.xxx/drupal.
b.yourdomain.com => actuall would point to 172.xxx/drupal.
c.yourdomain.com => actuall would point to 172.xxx/drupal.
After that your domain access module would automatically take care of your sub-domain wise access to content.
Note: Technically domain access module would show the content based on your current sub domain name.
I want to point a subdomain such as:
example.domain.com
to a URL like:
domain.com/something/this.php
How can I do this in Plesk?
Depending on how your scripts work, you can take one of two paths:
Add Domain, name it example.domain.com (yes, it will use one item of your domains limit), choose Redirect for Hosting Type and type target address there.
Add Subdomain and point its docroot folder to /{domain.com docroot}/something/ folder. So this.php will be accessed as example.domain.com/this.php and that.php as example.domain.com/that.php
I'm trying to map help.domain1.com to help.domain2.com. I've seen this on UserVoice. They let you map something.yourdomain.com to something.uservoice.com.
On domain1.com I've set up a CNAME to help.domain2.com.
It works fine but when I open help.domain1.com I get the content of domain2.com instead of help.domain2.com.
After some experimenting I've realized that this is an expected behavior.
So my question is what do I have to do on domain2.com (or maybe on domain1.com?) to have it show content of subdomain "help.domain2.com" when I navigate help.domain1.com?
(I'm using Plesk and the OS is Windows Server 2003)
I was facing the same problem for the last couple of days, and just found the solution...
In /etc/apache2/site-available/default, I had two virtual hosts, first one was for my domain, and the second one was for my sub domain. All I had to do was reverse the order of the virtual host blocks, placing the sub domain in front of the domain, and it worked! :D
I found the solution. One way would be to use a mod_rewrite rule on domain2.com and do a redirect if referrer is domain1.com. Or to assign a dedicated IP address.
HTTP/1.1 uses the Host: header to figure out which site is being requested, should there be more than one site hosted on the same IP address.
You need to ensure that the second (target) web-server is configured to expect incoming HTTP requests with the original URI in them.
I am not 100% sure how to do this in windows but in apache you just need to setup a virtual host to redirect it from the main domain to your subdomain.
you do not say if you are using IIS or apache or what the webserver is.
I imagine that what you need to do is setup a new website in IIS (not a virtual directory) and in the website tab click on advanced and edit the entry in there so that the "host header name" is the subdomain you want.
Jon Hawkins