0

I am using GoDaddy to host my domain, but when I use my domain to go to my contact page (or any other page, including outside pages), it stays at http://www.example.com, instead of the correct url e.g. example.com/contact.

When I use my ip address and port http://203.0.113.111:3050 it works correctly. But when I type www.example.com/contacts, it says Cannot GET //contact.

How can I fix this? Is it my nodejs server, or goDaddy?

  • If you are not using port 80 then you will need to specify this when using your domain name as well. In the first paragraph you state that "it stays at http://www.example.com", but in the second you say it reports "Cannot GET //contact"? – MrWhite May 15 '17 at 22:59
  • Your domain name seems to resolve to a different IP address than the one you are accessing your site through? – MrWhite May 15 '17 at 23:06
  • the site is www.mikeyhall.life clicking on the contact link works, but going to www.mikeyhall.life/contacts gets the "Cannot GET //contact" error. My Domain forwards to 104.154.170.86:3050 – michael hall May 16 '17 at 0:46
  • "My Domain forwards" - that would seem to be the problem. Everything is simply contained in an iframe. You need to correctly configure the DNS (A record or NAMESERVERs) to point the domain at your website hosting. (But why are you using port 3050?) – MrWhite May 16 '17 at 8:03
  • How would I do that? I use port 3050 because I'm already using port 80 for a php server. I'm also storing and serving my website off of a google cloud server. because I wanted complete control over my code. – michael hall May 16 '17 at 17:46
1

When you enter the domain name without port, it defaults to 80 for http or 443 for https. If you are using different port, like you are showing in your example (3050), you still need to use it even with domain name - domain.com:3050

DNS does not map anything to specific ports.

It looks like in your case the whole site is loaded in an iframe from the IP address when I open the domain name. It's not a very good or usual setup. You should run the webserver on port 80 and show the page directly, the you won't have problems with urls not changing, search indexing and usability.

| improve this answer | |
  • The iframe would seem to be the result of GoDaddy's domain forwarding. – MrWhite May 16 '17 at 8:00
  • how can I get it out of the iframe? I already have a different server at port 80 – michael hall May 16 '17 at 17:48
  • What kind of server do you have on port 80? You can configure virtual hosts (apache) or server block (nginx) as reverse-proxy to direct the traffic coming to this domain to node server. – Maadinsh May 16 '17 at 17:55
  • I have a php server at port 80, and a nodejs server at 3050, I can change that easily if I need to – michael hall May 17 '17 at 5:47
  • You can use apache or nginx server on port 80 and make it pass incoming traffic for domain1.com to php and domain2.com to nodejs. digitalocean.com/community/tutorials/… – Maadinsh May 17 '17 at 9:10

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.