I don't know which CDN explicitly supports this type of redirection, but I assume that many of them do.
If your CDN does not work, it is best to place the index.html file with the redirect header - and this is not a bad solution at all.
<html> <head> <meta http-equiv="refresh" content="0;url=http://primarydomain.com/" /> </head> <body> </body> </html>
Search engines even believe that this is correct 301 .
source share