• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

Change IP address to Name

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
arcross
Asked:
arcross
  • 14
  • 13
1 Solution
 
Chris DentPowerShell DeveloperCommented:

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
 
arcrossAuthor Commented:
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
 
Chris DentPowerShell DeveloperCommented:

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
Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

 
arcrossAuthor Commented:
Hi Chris,
my company domain name is different from the websitte? is it still possible to do that?
0
 
Chris DentPowerShell DeveloperCommented:

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
 
arcrossAuthor Commented:
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
 
Chris DentPowerShell DeveloperCommented:

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
 
arcrossAuthor Commented:
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
 
Chris DentPowerShell DeveloperCommented:

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

Chris
0
 
arcrossAuthor Commented:
yes i can
0
 
Chris DentPowerShell DeveloperCommented:

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
 
arcrossAuthor Commented:
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
 
Chris DentPowerShell DeveloperCommented:

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
 
arcrossAuthor Commented:
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
 
Chris DentPowerShell DeveloperCommented:

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
 
arcrossAuthor Commented:
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
 
arcrossAuthor Commented:
also, is ti possible that it takes a while to update the information ?? thats why it is not working yet ??
0
 
Chris DentPowerShell DeveloperCommented:

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
 
Chris DentPowerShell DeveloperCommented:

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
 
arcrossAuthor Commented:
Yuo re good, very good!
thanks!
0
 
Chris DentPowerShell DeveloperCommented:

You're welcome :)

Chris
0
 
arcrossAuthor Commented:
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
 
Chris DentPowerShell DeveloperCommented:

Anytime :)

Chris
0
 
arcrossAuthor Commented:
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
 
Chris DentPowerShell DeveloperCommented:

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
 
arcrossAuthor Commented:
that file you mean is in the server where the website is or the local pc??
0
 
Chris DentPowerShell DeveloperCommented:

Local PC.

Chris
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 14
  • 13
Tackle projects and never again get stuck behind a technical roadblock.
Join Now