Path routing with cloudfront CDN redirecting to webflow subdomain

We use cloudfront for path based routing. Traffic goes to either our webflow site our webapp (our product) based on the URL path. For this reason, our A records and Cname records point from our DNS to our cloudfront distribution.

I first created a behavior in my CDN to send traffic to our webflow subdomain mycompany.webflow.io and configure www.mycompany.com as the default domain. The default domain could not be validated since there are no cname or A records configured for the default domain. Everything seems to work EXCEPT that if there is a trailing “/” at the end of the URL on my site then on page load the page 301 redirects from my domain to the webflow subdomain.

I have also tried configuring a custom subdomain but when I have a custom subdomain set as my default domain I am not able to publish to my route domain since you can only publish to either the webflow subdomain and a single custom domain. This leads to my sitemap using my subdomain instead of www. It also does NOT fix the redirect issue when there is a trailing “/”.

Has anyone found a way to deal with this?

Thank you!!


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Maybe export it to AWS S3 Automated? Saves you all type of routing headache.

Look into this Export Webflow to AWS S3 Automated