Sign in to follow this  

DNS Help

Recommended Posts

murr    1

I'll try my best to explain my issue.

I pay a web hosting company for a service. To login into the portal for this service I would go to the following (fictitious) address.

I have my own registered domain. I would like to create a record that on the DNS for my domain that would redirect the traffic to the portal address above. something along the line as would forward to

I tried creating an A record for "forward" and assigning it to the ip address i was given for the portal site. But when trying to access it redirects me to So I am getting to the main site, not my portal page.

I then tried to create a CNAME for "forward" and pointed it to the A Record. That also did not help.

If I had to guess, I think the ip address that the portal resolves to is a shared ip. Make sense?

If that is the case, I don't believe there is a way for me to achieve my goal using DNS. Is there an option to have the web hosting company point a static ip address to the folder that is running the portal? If so, is this option available on all web servers? I believe the web server is running iis.

Any direction you can offer would be appreciated. Thanks.

Share this post

Link to post
Share on other sites
tim_s    42

Seems odd the CNAME did not work - are you able to share the actual domains so I can review the situation?

Share this post

Link to post
Share on other sites
primexx    372

you don't seem to understand how everything works at all


in the URL "", the domain portion is "". "com" being the top level domain (TLD), "example" second level, "foo" third level. the TLD is the domain extension for public (i.e. on the internet) domains, which means for web purposes the second level domain is the main one, so to speak.

DNS records for "" will have one or more IPs as A records, which translates "" to the actual numerical address of the server that your site is stored on. With dedicated IPs the IP alone is sufficient to load your website, with shared the IP points you to the server, and the server looks at the domain name that was requested and serves the right page. So basically "" tells the internet where you are.

The same thing happens with subdomains, sub-subdomains, etc. Usually they point to the same IP as the main "" domain, because they're generally used as sub-parts of your website, but you can specify any arbitrary IP address on them if you want to.

A CNAME record can be set on a domain/subdomain/etc. and the value is another domain name, e.g. "" or "". Basically that just tells anyone requesting the domain "hey I have the same DNS records as that other domain, so use those records". It's useful when you want to alias a domain to another, for example. So a CNAME record on "" with the value of "" will cause the requesting person to make a second DNS request to "" and use those records, which makes "" a copy of "".

the folder path, the part after the "/" doesn't come into any of this. The IP address of a server, and hence domain names tell you, and only tell you which server it is on. When you give something a URL like "" it first takes "", finds the DNS records, and figures out which server it is on. Then it talks to that server and asks the server to send it the file "qux.txt" which is located in the "/bar/baz/" folder.

So what did you do wrong?

First, it was likely a dedicated IP because when you visit that IP it shows you the homepage of the service provider. If it was shared it would show you a generic error page or placeholder or nothing at all. And service providers usually do use a dedicated IP for their own homepage.

Second, I have no idea what you mean by creating a CNAME record on "" pointing to the A record of "". Did you use "" as the value of the CNAME record? you can't use the same domain as the one you're setting the CNAME record on for obvious reasons. Did you use an IP address as the value? You don't do that because IP addresses don't have DNS records associated with them, they are actual addresses that point to actual servers. CNAME records are used to make a domain use the same DNS records as another domain.

Third, even if a CNAME record does what it appears that you thought it does, namely forward requests (which it doesn't, see above), the only thing that you told anyone was where to find the server, but not the path on the server where you can locate the page you actually want.

Fourth, you don't assign an IP to a folder. the folder is a location on the server, the server has an IP.

A records and CNAME records don't do what you want to do. What you actually need to use is a HTTP 301 (permanent) or 302 (moved temporarily) redirect that redirects visitors of "" to "". These redirects aren't DNS records so whether you can specify this behaviour in the domain manager directly is dependant on who your DNS host/domain manager provider is. I can specify 302 redirects on mine, for example, and they'll automatically send the HTTP response to anyone requesting a domain. If you can't do this in whatever manager you have, you should be able to configure the subdomain to point to your hosting service then configure the host to send that redirect response to all requests to the address. You can also always just use a small script as the index page of the subdomain and issue a redirect with it, e.g.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.