Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to Disclose Affiliate Links in Social Posts When Using Short URLs

A short URL does two jobs at once: it makes a link fit a character limit, and it hides where the link goes. The first job is why you use it. The second is why disclosure gets harder the moment you swap a raw affiliate URL for a shortened one, and that part is easy to forget when you post from a script instead of by hand. The disclosure has to move into the post itself, and there are three ways to…

When sharing affiliate links via short URLs, it becomes more challenging to disclose the material connection. Short URLs hide the destination and make disclosure harder, especially when using automated scripts. To ensure transparency, there are three methods to disclose affiliate links in social posts:

1. Include the disclosure in the post text before the link. This is the baseline approach, and other methods supplement it. Use a clear label like "Ad:" or "#ad" to indicate the link is an affiliate link. Place the label before the link, not after, so the reader knows what they are clicking on.

2. Create a short link that shows the disclosure itself when clicked. If you own the redirect, render a small disclosure page that appears instead of forwarding, only showing the final destination page after the user clicks through. This method requires escaping link destinations before interpolating them into HTML to prevent security vulnerabilities.

The disclosure should be present in the preview card shown by social clients, so include it in the og:title and og:description meta tags. Test the preview before publishing to ensure the disclosure is visible.

3. Implement a CI check that verifies affiliate links are correctly disclosed in drafts before publishing. Automate this process in your continuous integration pipeline to scale beyond a few posts per week. Use a map of short URLs to their destination and affiliate status to check each draft during the pre-publish review process.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How Does Rust Code Run on a GPU? Tracing cuda-oxide and PTX

I used cuda-oxide to run a vector addition kernel written in Rust on a GPU. Pass in two arrays and get back their element-wise sums.

  • Rust code is compiled into PTX for GPU execution using cuda-oxide
  • PTX represents Parallel Thread Execution for NVIDIA GPUs
  • cuda-oxide translates Rust thread indexing and array access to PTX

More from Sunday 1 November →