• Resolved fbords

    (@fbords)


    I was wondering if there was a way to set a featured image, title and description on the page with the redirect so that social cards and SEO previews will use the info I provide rather than the info from the page being redirected to.

    For example, I also use Yoast SEO which will allow you to override the image, title and description when the link is posted to social media. I can also do this natively in WP via the featured image and meta info for the pages. However, I can’t seem to get the previews to use the info from my blank page. It only scrapes the info from the destination I redirect to.

Viewing 2 replies - 1 through 2 (of 2 total)
  • CGS Web Designs

    (@cgscomputers)

    I don’t think so – social media providers such as Facebook and Twitter do their scrape on the content endpoint. The scrapers are pretty good at finding the actual content, they’ll follow redirect after redirect to get to it.

    The way this plugin works, you don’t even have an actual URL for the content on your site – check your sitemap_index.xml provided by Yoast and you’ll see that the pages you use this plugin with won’t even be there. Essentially it ignores your content and creates a redirect to the actual content.

    Plugin Author Mark Jaquith

    (@markjaquith)

    The problem here, as @cgscomputers noted, is the redirect. Facebook and Twitter follow the redirect to the custom URL, and then look at “open graph” data there.

    What I could do, and I’m considering, is make an option that lets you do a JavaScript-based redirect on that page. So any user who ends up at it (in a web browser) will get bounced through to your custom URL, but Facebook and Twitter, which won’t run the JavaScript, end up at the “dummy” page on your site, with all the Yoast SEO data. I’ll have to test to see if that works in more than just theory.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Social Cards and Meta info’ is closed to new replies.