Creating frame redirects causes Chrome to throw an X-Frame-Options error

Refused to display 'http://sotaexchange.cloudapp.net/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

I redirect my sotaexchange.com domain to the Discourse forum, but I get the above error. If I switch it to HTTP redirection there is no problem. I assume the problem is that my redirected domain has the same text as the original domain and looks like a hoax. What can I do to prevent this?

Edit

I open bounty to get the best answer. For more information, I am currently using Windows Azure to host a discourse site and redirect from several other domains that I have. I do not want to use HTTP redirection, I would like to use Frame redirection.

+3
source share
2 answers

It looks like you are trying to mask the forum url. Why aren't you using the cname function? See cname in the azure drawing for details .

+1
source

The same origin policy requires that the document or script that is accessing (the parent) have the same protocol, port and domain as the resource it is accessing (child).

If I understand correctly, you have a frame on a page in the domain sotaexchange.com, and it is trying to display content from the domain sotaexchange.cloudapp.net. This violates the same origin policy, and many browsers reject it. A regular HTTP redirect should always be in order.

0
source

All Articles