cdn – cloudfront + wordpress redirecting to the original URL

I work on the website https://mammoth.io. It's a wordpress site.

I configure this cloudfront for dfaqhcy4l1o60.cloudfront.net to serve the previously mentioned site.

Some URLs such as dfaqhcy4l1o60.cloudfront.net/faq work correctly, but dfaqhcy4l1o60.cloudfront.net is being redirected to https://mammoth.io.

I set the origin on the cloud front on mammoth.io and HTTPS only.

We have this rule on nginx

server {
listen to 80;
access_log /var/log/nginx/wordpress-access.log;
error_log /var/log/nginx/wordpress-error.log;
rewrite ^ https: // $ host $ request_uri? permanent;
}

I do not know why I get 301 only at the root of the wordpress site.