Link Cloaking & Masking

What is link cloaking?

Link cloaking, sometimes called link masking, URL masking, URL cloaking or link disguising, is the process of hiding a user’s destination in the browser address bar, by showing the current landing page in an iFrame.

This is particularly useful for affiliate marketing, where you are trying to prevent the user seeing an affiliate URL.

You can combine link cloaking with vanity URL, and use any URL you like for the cloaked page. This means using your own domain with Linkly. Linkly is both a link shortener and a link cloaker.

This will allow you to show the user pretty links, instead of affiliate links, which increases trust, brand recognition, and most importantly, click-through rate.

How to use Link Cloaking in Linkly

  1. Login to Linkly and click Create a New Link. Linkly has a free version with link cloaking enabled, for up to 1000 clicks/month.

  2. Fill in the Nickname & Destination fields.

  3. Under Cloaking, flip the cloaking switch. The link will now open in an iFrame, and the destination will be hidden.

Flip the switch to enable cloaking.
Flip the switch to enable cloaking.

Many websites now prevent cloaking

Many websites now prevent browsers from opening them an iFrame, the technology which enables link cloaking to work.

In this case, link cloaking won’t work.

Destination websites can set a meta tag called X-Frame-Option.

When this tag is set to DENY or SAMEORIGIN, browsers are prevented from opening a cloaked link.

Linkly will warn you when this is the case:

Not all destinations allow cloaking. Those with x-frames header set to deny or sameorigin won’t work.
Not all destinations allow cloaking. Those with x-frames header set to deny or sameorigin won’t work.

If you try to open the link, you’ll see the following symbol (Google Chrome):

You’ll see the ‘unhappy page’ symbol when trying to redirect to a site with **X-Frame-Option DENY** set with link cloaking enabled.
You’ll see the ‘unhappy page’ symbol when trying to redirect to a site with X-Frame-Option DENY set with link cloaking enabled.

Sometimes, you’ll see the page load, but not the images, for the same reason.

In these cases, you can’t use link cloaking.

Facebook, Google Ads and Link Cloaking

In general, using cloaking links with Facebook and Google Ads will cause the links to be marked as spam and blocked.

Typically this happens immediately for Google Ads, although on Facebook it may take a little longer.

Both Google & Meta require that users see the final destination they’re on. Using shortened pretty links with Linkly without link masking turned on is fine.

How Cloaking Works

Cloaking works using a technology called iFrames.

An iFrame is effectively a browser window inside the current window.

When visiting a cloaked page, we show a web page with another window inside it.

The users stays on the cloaked page, and the window inside loads the destination URL.

Many websites nowadays prevent themselves being opened in an iFrame, so cloaking doesn’t work on all destination URLs.

Benefits of Link Cloaking

The main reasons to use a link cloaker like Linkly are:

  • To hide the use of affiliate URLs/affiliate programs/affiliate IDs from users clicking on links
  • To show shortened pretty links, ideally using your own domain name, which increases CTR.
  • Allows you to distribute your links as a permalink, and still change the destination URL afterwards, while keeping the short link the same.
  • Allows you to add retargeting/remarketing tags to cloaked pages, so you can show adverts to users who don’t convert.
  • All cloaked links are also tracking links, so you’ll get comprehensive analytics on who clicked your link and when.

FAQ’s about Link Cloaking

How does link cloaking work?

Cloaking works by opening the destination page in an iFrame. The URL shown in the address bar is that of the cloaking link, and not of the destination.

Can I use a custom domain or vanity URL for my cloaked link?

Yes, link cloaking works well when combined with a custom domain to create vanity URLs.

Why do some websites not load in iFrames or when cloaked?

Not all websites can be opened in iFrames. It’s up to the destination website if they block iFrame loading. (Apple’s website is a good example of this).

Can you apply Facebook Pixel/Google Tag Manager/retargeting pixels to cloaked links?

Yes all re-targeting pixels and scripts and can be used.

Why is my cloaked link being blocked or marked as spam?

Cloaking can prevent robots from crawling through a link. This can cause a link to be marked as spam by automated systems. Generally speaking, cloaking is seen as an aggressive tactic and should be restricted to cases where it is necessary.

How are cloaked links treated for SEO purposes?

For SEO purposes, iFrames and cloaked links are generally considered the same as normal links.

Track 1000 monthly clicks with all features included.

No credit card required