I am working on a project, where I have a domain xyz.com, I have been requested that a subdomain example abc.xyz.com should point to website which has ipaddress
example http://199.152.57.120/client/ and when a visitor browse abc.xyz.com it should open the website hosted on http://199.152.57.120/client/ but by hidding this ip address the visitor should always see abc.xyz.com.
I also need to host another website to xyz.com
domain which is registered with x company and webhosting is taken for z company both different.
It is something similar to Reseller business where Reseller company assign a website to their client on their custom domain.
You can make A record in your DNS Server that IP address 199.152.57.120 pointing to abc.xyz.com
and then make same configuration in your web hosting that nginx/httpd virtual host point to directory /Some/Directory/client
you can read this for nginx https://www.linode.com/docs/websites/nginx/how-to-configure-nginx
It can be easily done in domain provider DNS zone. Just add A record where you will provide subdomain ex: abc.xyz.com and connect to adress ex: 1.2.3.4 How to do that in your domain provider, just check help pages for DNS records.
Alternatively you can install proxy software like NGINX and make subdomain redirect.
Example setting:
Related
I run a VPS with plesk on it. I will like to connect my clients domain (external) to a subdomain created for the client in my plesk setup. Below is the scenario.
I have a domain in plesk, say www.mydomain.com, for each client I setup a subdomain where I host the application say client1.mydomain.com, and client2.mydomain.com.
Now I want my client to enjoy my application through their own domain e.g www.client1.com, now www.client1.com is to be pointed to client1.mydomain.com, and www.client2.com to point to client2.mydomain.com.
I have added an A record for client1.com with my server IP but it points to my top domain www.mydomain.com and NOT the subdomain client1.mydomain.com which I want.
What do I need to change to have the below:
client1.com => client1.mydomain.com
client2.com => client2.mydomain.com
I don't want the redirection or domain masking. I want it like the way we have it in blogger.com or wordpress.com
I tried creating an Amazon EC2 instance with an elastic IP address. In there I deployed a MEAN app by Bitnami.
On the other hand we have a CPanel (not deployed in amazon, I think it's Apache, not sure, I'm not the one who deployed it)
Cpanel is already pointing to www.example.com so we can access cpanel via www.example.com:2082 but the default www.example.com:80 is blank/empty. We are using Cpanel for our mailing server.
What I need to do is to point Amazon EC2 public IP and DNS to www.example.com:80. Can I set it up in Cpanel DNS Zone Editor? or do I need to set up Amazon Route 53? what do I need?
If I create a new A record in Cpanel DNS Zone editor for Amazon I lose access to Cpanel www.example.com:2082. I'm really confuse right now. Please Help.
You need to introduce a Proxy server in between to do this, As in DNS you can't set the ports, for each type of requests ports are already defined.
You can add nginx or haproxy or any other reverse proxy server, which will accept all the requests and passes on the request to appropriate hosts on appropriate ports.
I know it's a bit late but just in case you still need it or someone comes across this:
No need for a proxy.
You point the A record for example.com to EC2 IP.
CNAME for WWW to example.com
Then you should have an A record for mail.example.com for your cPanel IP
Your MX records should point to mail.example.com and not to example.com.
And you can access cPanel at mail.example.com:2082 or whatever the server's IP or main hostname is. The main hostname has the advantage that you can use port 2083 for SSL cPanel connections
Just make sure the e-mail clients use mail.example.com and not example.com as the connecting mail server.
I have purchased a server through GoDaddy and when I access WHM or the CPanel, it uses the IP address of the server rather than the host name. How to I change this to use the host name and put SSL on that host name?
You could access WHM both on IP and hostname. Please check if your server actually has a valid hostname. If not, then you can't use WHM via hostname, so you'll have to configure a domain on that server and create a hostname for your WHM server.
Upon provision I was given a hostname of the form:
s192.168.2.###.secureserver.net This will not resolve in a browser. Nor will a ping -a to an IP address. It is a temporary hostname. It will work for creating resellers and putting up websites but you will not be able to secure it with an SSL cert as far as I know. You need a hostname that is also a domain that resolves to your server's primary IP address to allow login to WHM.
And the server has a requirement for hostnames as being an FQDN. The requirements for an FQDN are:
- Do not select a hostname that begins with www or a number, or a hostname that ends with a hyphen (-).
- You must use a fully-qualified domain name (FQDN) that contains two periods (for example, hostname.example.com).
- Do not choose a hostname that a cPanel account on your server will use.
- Do not choose a potential proxy subdomain as a hostname (for example, cpanel.example.com or whm.example.com).
- Do not select a socially-unacceptable hostname. The hostname will appear in mail headers.
- Only use lowercase, Latin-script letters in hostnames.
On the part that requires that you install an SSL for connecting to a URL and port number I cannot address yet but I purchased a cheam domain name from Godaddy, it was then auto parked.
Went into the DNS records for the domain and pointed the A record to the primary IP address of the server.
Record: A # 192.168.2.#### TTL: 18000
You will want to delete all the other records listed there as an FQDN cannot have any subdomain or potential proxy. So no CNAMEs allowed.
Leave Godaddy's name servers NS as they are.
Give the domain settings time to propagate. (i.e. 15min - 24hours)
Connect back to your WHM via ip (https://192.168.2.###:2087)
Navigate to Basic Setup or enter Basic Setup into the search and click on the link.
Change the NS servers at the bottom of the page to GoDaddy's name servers.
Save Settings change.
Enter the new hostname in the Set Up Networking section of WHM's Initial Setup Assistant interface.
Save your settings.
Navigate to your new domain name preceded by "https://" and followed by ":2087" (i.e https://mynewhostname.com:2087 ).
I believe this will get you at least that far for your process.
I have a domain on Godaddy and using amazon Route 53 hosting. I want to create a subdomain and make it point to a subdirectory in my site. How is it possible?
I Have Tried
Using S3 bucket, but s3 settings say host a static site. My site isn't static so I believe that option won't work
I have added a subdomain on route 53 with the help of this article
How do I create a subdomain for a domain hosted through Route 53?
and then changed my server settings to make new domain point to a subdirectory using this answer
How to point domain name to Amazon EC2 subdirectory. But it didn't work. Web page shows DNS server not found
Any kind of help will be appriciated. Thanks in advance.
DNS resolves a domain name to the IP address of your server. It only resolves the first part of a URL that defines the server -- it is not involved in the remainder of the URL.
For example:
http://example.com/path/index.html
DNS converts example.com into the IP address of the server. The request for /path/index.html is then sent to port 80 of that server.
Therefore, it is not possible to configure Amazon Route 53 (nor any DNS server) to point to a subdomain of your site.
You could, however, configure your web server to recognize requests going to different domain names and serve different content to the user. For example:
http://images.example.com/foo.jpg
DNS will resolve images.example.com to the same IP address, but the web server can notice that the original request was to images.example.com, so it should serve a different set of content, or content from a desired subdirectory. This configuration would be done within your web server. If that's what you'd like to do, please consult your web server documentation or search the web for that topic.
I had the same issue.
The solution was for me to set the load balancer (Application Load Balancer) as target for sub.mydomain.com and then in the load balancer listener rules, add a rule for the subdomain (as host header value) with a redirect.
sorry for this newbie question, as a Developer I never setup a web domain dns on a windows server. I already buy my .com domain, i will get an instance on amazon ec2. How I setup the dns on windows server 2008, to get traffic to my domain? Any tutorial? I have looked, but all i find is setup a local domain. Any tip for Amazon EC2?
Thanks
For most domain name hosts, they'll have some sort of way for you to link the domain name to a particular ip address or other domain name, both of which you can get from Amazon AWS. You can link an elastic ip that is associated with your instance and it'll work like a charm.
Assign an Elastic IP address to your server
Use your ISP's/Domain registrar's DNS tools to point your domain name at this ip address. The exact steps here will vary depending on who controls your domains DNS settings.
In iis, right-click on your site and choose edit bindings. Set your domain name as the host name (eg www.mydomain.com)