大网数据广告活动
网站运营与故障问答

Heroku App custom domain, forwarding from goDaddy & getting different behavior for `www.example.com` vs `example.com`

· 52CE 我爱测

I have deployed an app on heroku - http://appsparkler.heroku.com and created a custom domain for it - www.appsparkler.com Then, from goDaddy , where I have purchased this domain name appsparkler.com , I forward with masking to ht…

问题原文

原帖链接 · Aakash · CC BY-SA 3.0

I have deployed an app on heroku - http://appsparkler.heroku.com and created a custom domain for it - www.appsparkler.com

Then, from goDaddy, where I have purchased this domain name appsparkler.com, I forward with masking to http://appsparkler.heroku.com and redirect 301 (Permanent). Screenshot

Then, I made changes to the DNS ZONE FILE where I added CNAME and A Host as per a blog I found on the internet.

This works fine and when I visit www.appsparkler.com I am redirected with masking and can also visit the various links with the URL changing to the link I click on. However, when I browse the webapp with appsparkler.com i.e. without the www, I can go to the various links; however, the links in the address bar don't get updated. For comparision, I have added screenshot of address bar when on home page, first with www.appsparkler.com and then with appsparkler.com. We can see that /home doesn't reflect in second one. Moreover, even the favicon.ico doesn't appear in the second one (without www) as we can see...

I have tried searching a lot and also tried trial and errors with different settings and looked for solutions on the web and nothing worked.

Please help. Thank you in advance.

已采纳解答

原帖链接 · Aakash · CC BY-SA 3.0

Reference http://lifesforlearning.com/heroku-with-godaddy/

In the FORWARD AND MASKING section (which is under SETTINGS >> Forwarding), I was forward(ing) with masking (as you can see in the screenshot in the question above) to the herokuapp >> http://appsparkler.herokuapp.com. I changed that to forward(without masking) to http://www.appsparkler.com as you can see in the screenshot below.

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

资料来源与适用范围

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

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

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