The IP address of my site is returned when I do domain name search in my browser.

I am using:

  • GoDaddy Hosting
  • Nginx
  • Node.js

Obviously I would like the domain name and not the IP address, how can this issue be resolved?

  • 1
    I had asked a question that got an answer says 'Google can index IP addresses too' but preferably you should do a 301 redirect to your domain or a canonical one. but seriously I'm not sure about this. Sep 18 '15 at 6:46
  • 1
    "when I type my domain name into a browser" - It sounds like you are suggesting that your domain name redirects to your IP address? Or, are you searching on Google?
    – MrWhite
    Sep 18 '15 at 8:49
  • @w3d I think the OP meant the SERP displayed after typing their domain into the address/search bar (but not as a URL). I re-edited it to (hopefully) match their words more closely.
    – dan
    Sep 18 '15 at 9:39

Add this block to your NGINX config:

server {
       listen 80;
       server_name here.your.ip.address;
       rewrite ^ http://example.com$request_uri? permanent;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy