2

I currently have an Heroku app that is being served over a CDN. I have just added Fastly to my Heroku app as an addon and I am struggling to configure it properly. Here is my current configuration:

I have my domain registered on GoDaddy with the following CNAME configuration:

Host: www
Points to: my-site-herokuapp-com.global.ssl.fastly.net
TTL: Custom
Seconds: 600

Here is the GoDaddy forwarding configuration (not sure if this matters):

Forward to https://www.my-site.io/
(301 & forward only)

Here is my fastly configuration:

Domains:
my-site-herokuapp-com.global.ssl.fastly.net
*Provisioned for my-site via Heroku*

my-site.herokuapp.com
*Provisioned for my-site via Heroku*

www.my-site.io

And finally in Heroku in the domains configuration section of my app here are my settings:

Domain Name: my-site.io
DNS target: darwinian-kumquat-123456.herokudns.com

Domain Name: www.my-site.io
DNS target: serene-trout-123456.herokudns.com

Before I tried to make this change I had the CNAME pointing directly to: serene-trout-123456.herokudns.com an it was working fine. However after updating this value to the new Fastly value: my-site-herokuapp-com.global.ssl.fastly.net Fastly directs the site to my-site.herokuapp.com instead of just https://www.my-site.io. I followed the instructions listed here so not entirely sure where I have gone wrong. Any ideas?

red house 87
  • 1,837
  • 9
  • 50
  • 99

1 Answers1

0

Probably because you used redirect 301 and you are using the same browser as before before cleaning cache and data.

301 redirects are recomended only for very limited cases: once done the browsers will NOT refresh again any data from the original server.

There are plenty of posts regarding redirection 301, for example:

Cannot remove 301 redirect

htaccess 301 redirect - how to disable it?

https://www.exai.com/blog/301-redirects

user1039663
  • 1,230
  • 1
  • 9
  • 15
  • BTW I discovered this in the hard way... once in production and with every customer having cached the damm redirection... telling customers to clean all data from the browser is not a good solution, but once done... – user1039663 Oct 06 '20 at 17:10