Forum Moderators: phranque
Is there any way to fix this without ordering a third IP?
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.
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]