I have a domain test.com which is linked to a cloudfront distribution which then serves static content from s3 bucket. Now I want another domain www.test2.com to masked redirect to test.com. I created a CNAME entry in DNS settings of test2.com with name as 'www' and value as 'test.com'.
But when I browse to www.test2.com, I get this error.
How do I make sure www.test2.com actually redirects to test.com which in itself provides content from cloudfront?