What to Do When Email You Send Containing Vimeo Links Gets Flagged as Spam

One of my clients discovered that any email he sent that contained a Vimeo link was flagged as spam by Gmail recipients. All other email passed through fine.

In the recipient’s junk box, the email had this ominous warning attached to it:

Spam filter error message
Spam filter error message

Researching this further, I found he wasn’t the only one:

Many others have had this problem with no solution.

The Workarounds

I don’t know of a fix for this other than to convince Google to do something about it, which I’m not counting on. But there are two workarounds.

The first is to embed the Vimeo video into a website that you own, then embed that page’s URL in your email instead of the Vimeo URL.

The second is to do the same thing, but instead of embedding the Vimeo video on the page that you own, you create a redirect from that page to Vimeo. There are various ways to do redirects on a page at the server level or using JavaScript. In WordPress, there are plugins that do this.

To take it one step further, my client had a bunch of Vimeo videos to email out, each with a different URL. He didn’t want to have to create separate pages for each video. So, I created a single page where you pass the Vimeo ID in the URL, and it redirects to the corresponding Vimeo page.

This can be done most seamlessly at the server site, but it might be simpler for most people to implement in JavaScript, because all you have to do is paste it into the content of the page. That’s what I did. Here’s the code from Chat GPT:

// This script gets the Vimeo video ID from the query string (?id=VIDEO_ID)
// and redirects the user to https://vimeo.com/VIDEO_ID

(function () {
  // Parse the URL search parameters
  const params = new URLSearchParams(window.location.search);

  // Get the 'id' parameter
  const videoId = params.get('id');

  // If a video ID is found, redirect to the Vimeo video
  if (videoId) {
    const vimeoUrl = `https://vimeo.com/${encodeURIComponent(videoId)}`;
    window.location.href = vimeoUrl;
  } else {
    console.error('No Vimeo video ID found in the query string (e.g., ?id=123456789).');
  }
})();

Just visit the page with a query string, such as “https://www.yoursite.com?id=123456789” and it will redirect to the Vimeo video with that ID number

Conclusion

Let me know if this worked for you, or if you found a different solution in the comments below. – Brian

Shares

Discover more from Web Developer Tips and Tricks

Subscribe to get the latest posts sent to your email.

Please Leave a Question or Comment

Subscribe
Notify of
guest

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

0 Comments
Inline Feedbacks
View all comments