My client has server which we developed a new website on. We are trying to point an external domain on another server to this website. Do we just update the A record with the highlighted IP or? See image attached
Probably your WHM control just have the option to do it (update DNS records) automaticaly. But, if don't. Try adding at A records:
ns1.gandlp.com > 162.144.250.139
ns2.gandlp.com > 162.144.250.140
at your DNS Zone Editor control on CPanel
I recently changed NS of one domain to another host and created a domain using Helm Control Panel.
The problem is that when I type domain name (ie. www.MyDomain.com) instead of opening the coresponding website, it opens host webmail page which is served by smarter mail.
I have cleared dns cache, rebuilt and updated it. also I removed the domain and added it again.
Pinging the domain name returns server's IP address and it's up.
The hosting OS is windows server 2003.
I appreciate any comments to solve the problem.
Edit 1:
Though this was a long last headache, I solved the problem by removing domain's DNS entry alongside with all alias domains attached to it directly in DNS Server console, restarting server and then rebuilding DNS Zone via Helm Control Panel. I'm not sure if this was the best practice but it seems there was a mix of domain's DNS, alias domains' DNS, Hosting software, Caching problems.
Edit 2:
Actually this error was not about the DNS stuff, it is a failure of Helm Control Panel adding/removing alias domains. To share the experience, I Add a answer to this question.
This was not a DNS error.
I found the answer when examining IIS where i noticed the website was stopped.
Forcing the website to start, this error message poped up:
IIS was unable to start the site, another site may already be using the port you configured for this site.
Further investigation revealed that one same domain alias has previously added to another domain/host.
Removing this alias from IIS > Website Properties > Website > Advanced > Advanced Website Identification, fixed the problem.
What led me to assume a dns problem mistakenly was that default IP of server is set to mail server by default. so, when a website is stopped the domain points to mail server.
Hope this help for future.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm a newbie to hosting. Please bear with me.
I bought a new Virtual Server with my host GoDaddy. I want to setup my own DNS and point one or more domains to that server.
I have 3 IP addresses allocated to me. Lets assume them to be 10.0.0.1, 10.0.0.2 and 10.0.0.3. Lets assume the name of my server is "mydomain". This is what it shows when I right click on My Computer and go to Properties and see Full Computer Name. I have already installed the DNS role on this server.
What I want is to create DNS like ns1.mydomain.com and ns2.mydomain.com. Then I want to configure www.otherdomain.com to this server.
Can someone guide me on how to do the above.
Many Thanks,
Arun
If you wish to host the DNS on your own server you will have to register your nameservers with your domain registrar first. If this is Go Daddy you will use these steps:
Log in to your Account Manager.
Next to Domains, click Launch.
Click the domain name you want to use to register as your own nameserver.
In the Host Summary section, click add.
In Host name, enter the host name you want to register. This would be something like "ns1". The value entered here will be appended to your domain name to create the host name. Do not use the 'www' prefix. Example: For the domain name coolexample.com, entering 'ns1' here results in ns1.coolexample.com.
In the Host IP fields, enter the IP address for your server.
Click OK.
Once you have the two nameservers setup you can point your domains to the server using these. You will need to ensure that the Zone File for the domain you setup the nameservers on will have A records for ns1 and ns2 as well. If you host the domain on your server you would edit the Zone File on the server and add those A records. If you do not point the nameserver domain to your server you would just to this in the DNS editor in the Domain Manager.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I'm trying to redirect a domain to another via DNS.
I know that using IN CNAME it's posible.
www.proof.com IN CNAME www.proof-two.com.
What i need is a redirection with a path. When someone types www.proof.com, it should take them to to www.proof-two.com/path/index.htm
I know it can be done using Web Server facilities, but I need DNS redirection.
Is this possible?
No, what you ask is not possible. DNS is name resolution system and knows nothing about HTTP.
if you use AWS, a redirect like
mail.foo.com --> mail.google.com/a/foo.com
can be setup as follows:
in s3, create an empty bucket "mail.foo.com"
under Properties -> Static Website Hosting, set "redirect all requests to: mail.google.com/a/foo.com"
in route53, create an A record "mail.foo.com"
enable "alias", and set alias target to the "mail.foo.com" bucket
not a pure DNS solution, but it works ;)
But be aware of, the redirect skips all the URL parameters e.g.: ...?param1=value1¶m2=value2
I realize this is an old thread but FWIW, incase someone else is looking for a way to do this.
While dns does not understand the path portion of the url, it will understand subdomains, so instead of:
www.proof.com IN CNAME www.proof-two.com/path/index.htm
You could use:
www.proof.com IN CNAME proof.proof-two.com
then go to wherever you host proof-two.com and set it to point proof.proof-two.com to www.proof-two.com/path/index.htm.
~ there's always more than one way to skin a cat
Some providers allow this but there are no "pure" DNS solutions since DNS doesn't know anything about the protocol you're using and redirects are a feature from HTTP.
For OVH, see : https://docs.ovh.com/gb/en/domains/redirect-domain-name/
You will have to use the control panel to add your redirection. It will update your DNS zone accordingly.
Let's consider you created a redirection from foo.bar.com to foo2.bar.com/path. OVH keeps the url paths and parameters. So if you try to access foo.bar.com/hello?foo=bar, you'll be redirected to foo2.bar.com/path/hello?foo=bar.
I have a personal project that might help you in solving this issue.
It's an open source redirect solution that allows you to redirect your domain just changing your DNS settings. Link of the project: https://redirect.center/.
To redirect www.proof.com to www.proof-two.com keeping the URL parameters, just set your www DNS entry on proof.com:
www.proof.com IN CNAME www.proof-two.com.opts-uri.redirect.center.
Really it's easy with redirect.center
If you want create a CNAME as :
www.proof.com IN CNAME www.proof-two.com/path/index.htm
using redirect.center your CNAME look as canonical mode as:
www.proof.com IN CNAME www.proof-two.com.opts-slash.path.opts-slash.index.htm.redirect.center.
Now if you want redirect to https website you can add this option:
www.proof.com IN CNAME www.proof-two.com.opts-slash.path.opts-slash.index.htm.opts-https.redirect.center.
Now you can create a CNAME with the canonical mode with slash in your destiny page.
To answer the original question, no, what you want is not possible using only DNS (like everyone has stated). In addition to everything mentioned already, another option is to use a URL redirection service. These types of services can enable you to configure many different types of URL redirects depending on your needs. For example:
Forward a domain apex to a www. subdomain or vice versa
Forward a collection of domain names to a single destination (useful for forwarding domain misspellings, old company names, etc.)
Forward specific domain names to deeply linked pages (like what the OP wants)
A service that does this is EasyRedir. Full disclosure: I developed EasyRedir. There are certainly other options out there though, so I encourage you to have a look around.
DNS won't redirect the path portion of a URL, so that won't be possible.
Adding
www.proof.com IN CNAME www.proof-two.com
will direct access to www.proof.com to www.proof-two.com, where you will need to use web server config to direct users to the appropriate page.
A related work concluded all the below:
Problem:
http://a.com/p1/p2.html should go to http://B.com/p1/p2.html
today, but later when configured manually/automatically, the same
http://a.com/p1/p2.html should go to http://C.com/p1/p2.html
Answers:
DNS - converts name to IP address
Though it can do a lot of redirects, always output is IP address
DNS does not understand the path or protocol part of URL, understands domain part only, that is, a.com only is converted to IP address, so when you hit http://a.com/p1/p2.html may be converted to http://152.132.121.11/p1/p2.html
if you configure wrong in DNS, then you will get 152.132.121.11 (not http://152.132.121.11/p1/p2.html), so you would get some 400s error (400, 403, etc.)
Redirection - this is http://a.com/p1/p2.html can be converted to http://b.com/p1/p2.html
All the methods like GET, POST can work, with if any headers and body, but there is a web server is involved, it could be point of failure, so scalability and availability will be key
If you are on AWS, Route 53 -> API Gateway is possible though custom domains, internally using the Cloud front
It is possible with Amazon Certification Manager, AWS Gateway custom domains & Route53, note the us-east-1 restriction on ACM
Hope that helps someone
I will suppose you have this scenario: You have a unique webserver hosting various websites, each one is supposed to be presented by a separated domain:
http://example.com/customer1/website/page1.html
http://example.com/customer2/website/page2.html
so, the page1.html should be served by www.customer1.com and so on.
create a subdomain inside the example.com dns server (your webserver):
customer1.example.com
in your apache virtual server settings, map the subdomain to the directory that contain the web site for your customer #1, like this:
<VirtualHost *:80>
SetEnv PAGE_ID "customer1"
ServerName customer1.example.com
ServerAlias www.customer1.com
DocumentRoot /your/local/path/webserver/customer1
</VirtualHost>
please note the value for "ServerAlias", it is important for the next step-
at this point, you should be able to navigate to your customer1 website by browsing to:
customer1.example.com
In the DNS settings for customer1.com you must make a CNAME record:
CNAME=www
LOCATION=customer1.example.com
Now, you're enabled to use: www.customer1.com.
My solution to this problem was pretty simple and straight forward. All you need is an IIS server running inside the domain.
Setup CNAME in DNS to point to the IIS server, using host names in IIS to resolve several sites on a single IIS server. I'm using the same IIS server to farm out a few sub domains to external sites.
Then in IIS setup setup redirection for that site to go to your offsite site/path, in my case it was our hosted catalog that I wanted catalog.ourdomain.com to go to. From here all the tweaking is done in IIS. Be sure to enable anonymous authentication so traffic will not be blocked.
While as almost everyone stated already - it's impossible using just DNS. As a workaround I would suggest trying NGINX (http://nginx.org/en/docs/http/request_processing.html).
TL;DR - In NGINX you can create multiple virtual servers that can redirect your request based on the server name.
Ex. http://first.my-server.com redirect to place A and http://second.my-server.com redirect to place B, while both share a single physical server.
You can use htaccess rewrite mod, rewrite to the subfolder if the user is requesting one specific domain not the other.
Of course it is possible to redirect, with the following trick:
Create a new standard primary zone
Name it same as the fictive URL that you want to redirect to
Ensure that this fictive name is different than any AD DNS name
Create A record with following entries:
blank.......................A............................ip-addr-2
www.........................A............................ip-addr-2
What we have here is redirection, essentially. A valid URL will resolve based on the existing DNS primary DNS zone. A fictive URL will be redirected to ip-addr-2. What is important is that the name of this entry is blank, so it will fall down to the next entry in the record and redirect to ip-addr-2
Everyone has already stated this, and I just want to give you another option to a service that can help you. www.301redirect.it is a free service that can redirect your domain (with wildcard) to any destination url.
I want to add a disclosure as well: I'm the developer behind this service and there is a other options out there.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I want to find out all the subdomains of a given domain. I found a hint which tells me to dig the authoritative Nameserver with the following option:
dig #ns1.foo.example example.com axfr
But this never works. Has anyone a better idea/approach
The hint (using axfr) only works if the NS you're querying (ns1.foo.example in your example) is configured to allow AXFR requests from the IP you're using; this is unlikely, unless your IP is configured as a secondary for the domain in question.
Basically, there's no easy way to do it if you're not allowed to use axfr. This is intentional, so the only way around it would be via brute force (i.e. dig a.example.com, dig b.example.com, ...), which I can't recommend, as it could be viewed as a denial of service attack.
If you can't get this information from DNS (e.g. you aren't authorized) then one alternative is to use Wolfram Alpha.
Enter the domain into the search box and run the search. (E.g. stackexchange.com)
In the 3rd section from the top (named "Web statistics for all of stackexchange.com") click Subdomains
In the Subdomains section click More
You will be able to see a list of sub-domains there. Although I suspect it does not show ALL sub-domains.
You can use:
$ host -l example.com
Under the hood, this uses the AXFR query mentioned above. You might not be allowed to do this though. In that case, you'll get a transfer failed message.
dig example.com soa
dig #ns.SOA.example example.com axfr
robotex tools which are free will let you do this but they make you enter the ip of the domain first:
find out the ip (there's a good ff plugin which does this but I can't post the link cos this is my first post here!)
do an ip search on robotex: http://www.robtex.com/ip/
in the results page that follows click on the domain you're interested in>
you are taken to a page that lists all subdomains + a load of other information such as mail server info
You can only do this if you are connecting to a DNS server for the domain -and- AXFR is enabled for your IP address. This is the mechanism that secondary systems use to load a zone from the primary. In the old days, this was not restricted, but due to security concerns, most primary name servers have a whitelist of: secondary name servers + a couple special systems.
If the nameserver you are using allows this then you can use dig or nslookup.
For example:
#nslookup
>ls example.com
NOTE: because nslookup is being deprecated for dig and other newere tools, some versions of nslookup do not support "ls", most notably macOS X's bundled version.
In Windows nslookup the command is
ls -d example.com > outfile.txt
which stores the subdomain list in outfile.txt
few domains these days allow this
If the DNS server is configured properly, you won't be able to get the entire domain. If for some reason is allows zone transfers from any host, you'll have to send it the correct packet to make that request. I suspect that's what the dig statement you included does.