问题原文
原帖链接 · user2061057 · CC BY-SA 3.0
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 :)
已采纳解答
原帖链接 · JayMcTee · CC BY-SA 3.0
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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
