homepage Welcome to WebmasterWorld Guest from 54.145.172.149
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
IP's and my nameservers
Asia_Expat

5+ Year Member



 
Msg#: 3617960 posted 10:49 am on Apr 3, 2008 (gmt 0)

I'm currently on a steep learning curve. I'm setting up my own nameservers in advance of my move to a new server in Singapore using cPanel.
My host has assigned me two IP's both of which I have used for the nameservers.
My main website build (still configuring on the server) is on one of those IP's and the nameserver also uising that IP is resovling to that website, in effect a serious dupe content risk.

Is there any way to fix this without ordering a third IP?

 

lammert

WebmasterWorld Senior Member lammert us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3617960 posted 11:49 am on Apr 4, 2008 (gmt 0)

and the nameserver also uising that IP is resovling to that website, in effect a serious dupe content risk.

No, this is in itself not a serious dupe content risk.

I assume that you have assigned the names ns1.example.com to IP1, and ns2.example.com to IP2. Your website is visible on www.example.com. In that case you should configure your webserver in such a way that it only honors HTTP requests that are directed to (www.)example.com, but not to ns1.example.com. This can simply be done in Apache, and probably also in IIS.

It is not the dupe content risk that is a problem in your configuration, but the single point of failure you have created in your configuration. The best option is to have the domain registration, hosting and DNS service at three different providers.

The second best option is to have your domain registrar do the DNS, and host your site at a second provider.

Worst case scenario: everything in one hand. You will be screwed once you have a disagreement with your hosting company. As they control both the domain name and the DNS records, you are their hostage in every conflict and there is no way you can move your site to another hosting company. If they ever get bankrupt, your site will vanish from the web. There is no simple way to recover from that if registration, DNS and hosting all went through the same channel.

Asia_Expat

5+ Year Member



 
Msg#: 3617960 posted 5:09 am on Apr 6, 2008 (gmt 0)

Thanks... I have my domains registered elsewhere and I'll certainly look into using as third provider for my DNS. I fixed the above by getting a new IP address because I'm nort ready to fiddle around with the Apache configuration until I better know what I'm doing.

On a related note, my htaccess file previously looked like this and was redirecting example.com to www.example .com...

RewriteEngine on
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]
rewritecond %{the_request} ^[A-Z]{3,9}\ /(([^/]+/)*)index\.xhtml\ HTTP/
RewriteRule index\.xhtml$ http://www.example.com/%1 [R=301,L]

I now need to 301 the IP address to the domain name and have changed my file to...

RewriteEngine on
RewriteCond %{HTTP_HOST} ^[0-9]+(\.[0-9]+){3} [OR]
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
rewritecond %{the_request} ^[A-Z]{3,9}\ /(([^/]+/)*)index\.xhtml\ HTTP/
RewriteRule index\.xhtml$ http://www.example.com/%1 [R=301,L]

I patched it together with bits I found elsewhere on webmasterworld but there are a few differences between a couple of the lines. Everything seems to be working as it should and the IP version seems to be 301ing to the domain name version of each page, as is the previous rules to non-www to the www.example.com version... but I hope someone can look carefully at what I've done to see if they can spot any potential problems, or any obvious errors I may have made?...

[edited by: Asia_Expat at 5:10 am (utc) on April 6, 2008]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved