Have you came across a situation were you need to show a 3rd party website on your “URL”? Maybe you even tried for a solution. But did you ever imagined that there is a solution for this in iFrame, yes you heard it right, our own old school iFrame can completely help you here.

As this code is using the iFrame, it is the simplest and the easiest to implement. The main highlight about this is that the visitor wouldn’t even have a clue about it’s original URL.

Now lets go straight away to the code.

The iFrame Code To Load A Website On Another URL Using iFrame

Go to your domains root folder and create a file named “index.html”. Now edit that file and copy paste the below code to it. You may change the domain “www.websiteurl.com” to the one of your choice. Do not forget to save the page.

<title>Website Title</title>
<style type=”text/css”>
body, html
margin: 0; padding: 0; height: 100%; overflow: hidden;

position:absolute; left: 0; right: 0; bottom: 0; top: 0px;
<div id=”content”>
<iframe width=”100%” height=”100%” frameborder=”0″ src=”https://www.websiteurl.com”></iframe>

Once done just open your “URL” and see the magic.

Please check how I have loaded “bbc.com” on my “raretricks” sub domain “cl.raretricks.com” below.

Should you have any doubts please let me know using the below comment section.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.