2

I am hosting a Python Flask web app on AWS EC2 and am mapping this AWS URL (http://myappname-env.abcxyz.us-west-2.elasticbeanstalk.com) to a domain on Google Domains (example.com). I have the A and CNAME records on the DNS page. When I go to example.com, I see the correct page, and the browser address bar says, correctly, example.com. But I am facing 2 issues:

  1. Whenever I hover on any hyperlink, e.g. on the menu item for the /info page, the browser status bar shows the AWS address i.e. http://myappname-env.abcxyz.us-west-2.elasticbeanstalk.com/info instead of example.com/info.

  2. When I go click on the link to example.com/info, the browser address bar still says example.com, even though I, correctly, get navigated to the new page corresponding to /info.

VRA
  • 21
  • 1
  • Have you hard coded the elasticbeanstalk addresses into the flask templates? Please confirm any hyperlinks in the template files look like `href='/info'` rather than `href='http://mya...ticbeanstalk/info'`. – v25 Jan 25 '19 at 18:04
  • I've used relative links. So `/info` rather than the entire url. – VRA Jan 26 '19 at 19:15
  • In which case, could this be down to some kind of caching issue? Have you tried disabling cache in your browsers dev tools, and reloading a few times. Check where any static files are loading from (do these load from the ebs address or example.com on the dev-tools network tab). – v25 Jan 26 '19 at 19:57
  • I'm assuming you can't post the actual domain here so we can have a peek, then delete from comments later? – v25 Jan 26 '19 at 19:58

0 Answers0