I have a working Angular 4 site at http://tika.io where all routes seem to be working as they should. For instance, http://tika.io/mink works perfectly fine when typing it into the address bar. All the routes are implemented using a router.
When I try to put any URL other than the base url into the link field in Google Adwords and Mailchimp redirecting service for confirmation forms, I get told that the URL is not valid. I have tried /mink and /[all the other URLs that exist], but all of them are invalid.
Since both of these services say the link is invalid, I think there might be something wrong with the site. Any assistance is appreciated!

- 2,478
- 7
- 23
- 35

- 43
- 5
2 Answers
I found a lead at https://angular.io/guide/deployment that talks about "Configure the server to redirect requests for missing files to index.html". There is more specific information here. Apparently it's the nature of single page apps that's causing this behavior. The accepted answer here pointed me in the right direction.

- 43
- 5
If you load the webpage (tika.io/mink) and inspect the network console (cmd + option + i on Chrome), you'll see that the request for mink returns a 404 even though the page itself loads fine.
To Mailchimp, the page doesn't exist.
To fix it, return response 200 instead of 404. In Amazon, create a Cloudfront distribution as specified in this answer or this documentation.
Don't forget to also repoint requests to your domain to your Cloudfront domain name instead of whatever it was before.
Once that's all deployed, you should be able to reload your page and see that it returns a status 200. Then Google will recognize it.

- 28
- 4