For certain reasons, you may want to protect your website from being framed by another website. This is important if you are concerned that another website could take credit for your work like Google Images does in its image search.
Any image traffic you get from Google does not actually have to surf to your website, instead users can conveniently grab your images straight from the image preview pop up in Google Images search. They have to actually close the picture to view your website in its entirety.
Add this code somewhere in between your
<head> tags in your website’s HTML code:
What this small piece of code does is check if there is a parent frame, meaning your website has been put in a frame by another website. If it has, you simply change the parent frame’s URL to your websites URL. It’s that easy.