How to Hide Redirect With an iFrame

Send users to a different URL without them noticing.
Send users to a different URL without them noticing. (Image: Jupiterimages/Creatas/Getty Images)

Showing users that you're redirecting them isn't always a good idea. If a user sees her URL bar going through several different URLs before reaching the final page, she might suspect you're collecting a commission, or even suspect that her data is being sent to several different websites. To create a cleaner user experience, use an iFrame to hide your redirects. The user will just see your parent page's URL the entire time, even if your iFrame goes through several different redirects.

Create a page that contains either a PHP or a Meta redirect. This is the page that will be embedded in your iFrame. The redirect could redirect to a second redirect if you so choose.

Create your main page. Be sure to fill in your title tags and meta tags because the iFrame parent page won't inherit these tags from the framed page.

Put the following code into your parent page: <iframe src="INSERTPAGEHERE.html" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" scrolling="auto"></iframe>.

This will create a full page iFrame, so that users will see your redirected page without seeing the URLs bouncing in their URL bar.

Upload all the pages you've created to your server. Test your iFrame and your redirect to make sure everything is working properly.

Related Searches


Promoted By Zergnet


Related Searches

Check It Out

Are You Really Getting A Deal From Discount Stores?

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!