Solved

Change IP address to Name

Posted on 2008-06-17
27
196 Views
Last Modified: 2010-04-07
hello,
im hosting my own website. When I access the web from interent typing:  www.myweb.com it becomes on the address bar http://IP-address/myweb.com.

The domain name in my company, where im hosting the website, is different from the website name.  Is it possible to create CNAME or A records, on the DNS server , to not to show the ip-address on the bar ?
just show the name of my web?

dont know if ive explained clear, but i dont have much idea on this subject. I just dont want to show the ip address. just the name

thanks!
0
Comment
Question by:arcross
  • 14
  • 13
27 Comments
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21814527

It depends a little on how you're ending up at http://IP-address/myweb.com.

If you're being forwarded to the URL as an IP there's nothing you can do. The browser goes where it's told in that respect.

However, if you were going to http://IP-address/myweb.com directly you could add a Host (A) Record to your domain. e.g. www2.myweb.com  IN A  IP-address.

Chris
0
 
LVL 8

Author Comment

by:arcross
ID: 21815700
Hi Chris, at the moment im using the site where i bought the domain from, to forward the web to my server.
I dont know much about the subject. But could i set in this site i got the name from, pointing to my dns server or something like that??
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21820367

Do you have access to DNS configuration for your domain?

Really all you need is:

myweb.com -> IP-address

Or

www.myweb.com -> IP-address

Then it will go directly to your server rather than forwarding.

For the forwarding you've set, if the browser is told to go to http://IP-address/myweb.com there's no way to change the IP to a name without re-doing the forwarding, or by taking out that forwarding step.

Chris
0
 
LVL 8

Author Comment

by:arcross
ID: 21845169
Hi Chris,
my company domain name is different from the websitte? is it still possible to do that?
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21853537

You can use whichever domain name you wish, but it does depend very much on how you end up at the web site at the moment.

When you go to the website at the moment are you going directly to http://IP-address/myweb.com? Or are you going to "http://myweb.com" and being redirected there?

Chris

0
 
LVL 8

Author Comment

by:arcross
ID: 21853789
hi chris,
I type in the browser  'www.web.com' and it redirects it to my server. Then, the address bar shows http://ip-address/myweb.com
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21853827

I worried that might be the case.

Do you have control of the redirection at all? Or does your host handle that?

If it's your host there's nothing you can do unless you want visitors to type in:

http://somename.com/myweb.com

Which I guess isn't likely?

Chris
0
 
LVL 8

Author Comment

by:arcross
ID: 21854672
In the site I'm doing my redirection I can access a control panel where i can get at the DN settings, (A ,CNAME records,  Mx records), Change the servers names, etc...

any good?
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21854714

Can you change where the site redirects to? That is, if you wanted to, could you change that to a name?

Chris
0
 
LVL 8

Author Comment

by:arcross
ID: 21855183
yes i can
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21855349

Excellent :)

The name is arbitrary, did you have anything in mind?

For instance, you could add this to your DNS server in the Control Panel:

www2   A   IP-Address

Then on your Redirect change it to:

myweb.com -> www2.myweb.com/myweb.com

It's a little messy, but you can't get rid of the trailing "/myweb.com" unless you can change how the site is hosted.

It will let you hide the IP Address though.

Chris
0
 
LVL 8

Author Comment

by:arcross
ID: 21855384
ok. ill try that Chris.
Im hosting the web myself, so, how can I change it to get rid of the last 'web.com'?
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21855399

You are? Ahh okay, I'd assumed you were hosting it on a third parties servers.

Hosting it using IIS?

The /myweb.com must be a Virtual Directory (or actual directory) on the web server. Ideally you would set the contents of "myweb.com" as the root of the web site (Home Directory).

Chris
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 8

Author Comment

by:arcross
ID: 21855541
Yes im hosting it and using ISS.
It is a virtual directory. Ive got 2 websites. They are located in C:\Mywebs\web1 and C:\mywebs\web2.
Are you saying i should move the web to the root like C:web1 ??

Also, ive tried that in my 3rd party redirection site:
This is what i had alraady:
 @           A    Ip address
www      A    Same IP address as above (dont know where this points. this was already there)

now, i added, what you said...
www2    A    My server IP address


In the redirection page (i didnt really understand what you meant here) i changed from :

http://My-SERVER-IP/webSiteDirectory

To:

www2.WebServerDirectory/WebServerDirectory (which i asume i did it wrong !!)

thanks Chris, for all your help so far..
0
 
LVL 70

Accepted Solution

by:
Chris Dent earned 500 total points
ID: 21856100

That's quite complicated :)

How many sites do you have configured in IIS? Just the one?

We should take a quick look at IIS and Host Headers.

Host Headers allows us to host multiple sites on IIS using one IP Address. IIS filters based on the name used in the request from a client.

For example:

1. Start the site creation wizard in IIS (right click on Web Sites, New Site).
2. Enter a description (whatever you like)
3. On the IP Address and Port Settings page you should see a Host Header box. This is where you would enter the name to access the site (e.g. www.mydomain.com).

Using the means that if we wanted to host www.myotherdomain.com on the system we just create a new site and enter the name. Or we can add more names to a specific site by pressing the "Advanced" button under Web Site Identification (in the properties for the site).

This mechanism would allow us to host hundreds of different web sites on IIS if we wanted to.

What that means here is if you want two distinct sites for web1 and web2 you can have them if each site is accessed by a different name.

Ideally then we'd want the Home Directory for the Website to be:

www.myweb.com -> C:\Mywebs\web1

Having the content there means we can go to the Web Site directly instead of heading off to a sub-folder, or Virtual Directory within the site.

Does that make any sense? :)

On the DNS side, we should drop that Redirect unless you have a good reason to keep it. It's just making things more complex.

If you want to access your site on www.myweb.com you just need to change a couple of those records in DNS:

@           A    My server IP address
www      A    My server IP address

In this case we'd have to ensure that the Web Site we want to answer those requests has Host Headers for "myweb.com" (that's what the @ means) and "www.myweb.com".

Chris
0
 
LVL 8

Author Comment

by:arcross
ID: 21856954
Hi chris,
i tried, just a queation, this may be silly but , actually , the service im using to redirect the page, says web forwarding ?? is this the same ? does the same principle apply? Becuase ive done it and when I type the website it takes to this 3party site, where i purchased the domain name, saying that its taking me to a holding page. Thats when i removed the web forwarding bit. I also changed the DNS settings in this site  not my sever ??  I apologise about all this quetions, but i dont have a clue in all this dns stuff..
0
 
LVL 8

Author Comment

by:arcross
ID: 21856966
also, is ti possible that it takes a while to update the information ?? thats why it is not working yet ??
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21857044

Oops, yes. Sorry, I meant to post back saying that.

Any change to DNS will take a while to propagate. That can be anything up to 48 hours depending on your settings.

While you can't hurry the process as a whole you can update your view of it. You would need to clear the cache on your local DNS Server. Doing so is only any good if it is set to use Root Hints (that is, not Forwarders).

If you'd rather just see how long you'll have to wait, open up the command prompt then type these:

nslookup
set debug
www.myweb.com

You'll get back a block that looks something like this:

Got answer:
    HEADER:
        opcode = QUERY, id = 13, rcode = NOERROR
        header flags:  response, auth. answer
        questions = 1,  answers = 1,  authority records = 0,  additional = 0

    QUESTIONS:
        www.myweb.com, type = A, class = IN
    ANSWERS:
    ->  www.myweb.com
        internet address = 123.123.123.123
        ttl = 43165 (11 hours 59 mins 25 secs)

Where the TTL shows the amount of time left before you'll get the updated record.

Chris
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21857083

One more bit.

To alleviate the issue for now, reinstate the Web Forwarding for a day or so to give the change time to fully propagate.

Chris
0
 
LVL 8

Author Comment

by:arcross
ID: 21857203
Yuo re good, very good!
thanks!
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21857244

You're welcome :)

Chris
0
 
LVL 8

Author Comment

by:arcross
ID: 21858539
Hi Chris, let you know that it works !!
ive been posting questions here about this issue for weeks  and i was still waiting for a solution !!

that was awesome ! thanks again!!
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21860553

Anytime :)

Chris
0
 
LVL 8

Author Comment

by:arcross
ID: 21864114
Hey Chris, i know this question is closed. I feel stupid asking this.. :) but how can i access the website now internally. Im trying to access the site from another pc. Typing the Ip address\Name of site it doesnt work. HOw do i do it ??
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21864139

Don't feel stupid about it :)

It will need you to use a name if you've got Host Headers. You've changed it so you access it on "www.myweb.com" externally now?

To test it out, open up the following file in Notepad:

%SystemRoot%\System32\Drivers\etc\hosts

Add a line like this:

<Internal-IP>    www.myweb.com

Then you should be able to browse to the site.

That's no good if there's more than you that needs to access it, but it's a good test.

If it works like that, do you have an internal DNS Server?

Chris
0
 
LVL 8

Author Comment

by:arcross
ID: 21864200
that file you mean is in the server where the website is or the local pc??
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21864215

Local PC.

Chris
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you have a multi-homed DNS setup in windows, you can have issues with connectivity to the server that hosts the DNS services (or even member servers of your domain if this same DNS server is a DC). This is because windows registers all of its IPs…
Occasionally you run into the website or two that will not resolve properly using your own DNS servers.  Some people simply set up global forwarders for their DNS server.  I don’t recommend doing this because it can cause problems resolving addresse…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now