1

I set up a DNS masking for my GoDaddy domain so that my Amazon EC2 url wouldn't be shown to the user. Instead of the original index.html returned by Nginx the user now gets it wrapped in some GoDaddy stuff:

<head>
  <title>My Home</title>
  <META name="description" content="Blah blah."><META name="keywords" content="Blah, blah">
</head>
<frameset rows="100%,*" border="0">
  <frame src="http://ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com" frameborder="0" />
  <frame frameborder="0" noresize />
</frameset>

The ultimate problem is that this seems to break my HTML meta viewport setting in the original index.html and the page is incorrectly rendered on mobile devices. Of course the setting is still there somewhere, but browsers seem to ignore it probably due to that frame thing.

How can I fix this? I don't know if I'm even doing this setup correctly as I'm a complete novice in this stuff :)

9
  • Do you even want to use an iframe? Why not let DNS resolve to the IP of your EC2 instance? This looks like a ver long way around. Perhaps explain what you are trying to achieve, rather than focus on this particular problem.
    – JayMcTee
    Apr 7, 2016 at 16:23
  • I'm just trying to hide the EC2 address from the browser and show my domain name instead. After some googling I guess the CNAME setting should do it? Apr 8, 2016 at 10:09
  • First get an elastic IP in your AWS account. Then indeed resolve the domain name to that IP. No iframes needed!
    – JayMcTee
    Apr 8, 2016 at 10:10
  • Now that I removed the framing my browser says "This website is temporarily unavailable, please try again later. ", but when I refresh it goes to the EC2. Why is this? I cleared the cache but it didn't help. Apr 8, 2016 at 10:11
  • I get "This website is temporarily unavailable, please try again later. " every time I go to my domain. Apr 8, 2016 at 10:12

1 Answer 1

1

It seems you simply want to have your domain name resolve to your EC2 instance. What you are attempting now is a convoluted long away around to achieve this. Your current way will hurt you in rankings etc.

What you probably really want is:

  • Create en elastic IP in your AWS account
  • Attach this elastic IP to your EC2 instance
  • In GoDaddy configure your domain name DNS to this IP address, an A record should be fine
  • Remove redirects etc. from GoDaddy, just use plain DNS means
  • Wait for DNS to propagate, can be a few hours
  • Remove your iframe, just build normal HTML pages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .