How does one set their website to be iframe unfriendly? Intriguing.
x-frame-options:SAMEORIGIN
However you could also check for: window.top == window if (window.top !== window) {
window.top.location = window.location
}
It's useful if your website is being iframed to display ads or exploited with cross window communication security holes (old school)