大网数据广告活动
服务器运维问答

Problems with GoDaddy DNS masking and html viewport

· 52CE 我爱测

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<…

问题原文

原帖链接 · 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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-04-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。