The image uploaded shows the post preview thumbnail of facebook.
(1)Consider a link x.com/abc which is redirected to y.com/xyz.
(2)When the link x.com/abc is shared on facebook it's preview is fetched from y.com/xyz.
(3)The preview thumbnail generated by facebook contains the domain y.com and not the x.com.
(4)How do we make the preview thumbnail show x.com and not the target url y.com.
The facebook screenshot show's that I shared url hivirality.com/abhishek which is redirected on citryxsolutions.in but the preview thumbnail contains the domain name of targeted url i.e citryxsolutions.in.
What are the possible cases to fix the issue.
You can do that, but it is a bit tricky. Instead of 301 redirect from x.com/abc
to y.com/xyz
. Your server should return HTML, which will redirect user through JS. This HTML should have Open Graph markup which Facebook is parsing. For example:
<!doctype html>
<html lang='en'>
<head>
<meta charset="utf-8" />
<meta property="og:url" content="URL" />
<meta property="og:title" content="TITLE" />
<meta property="og:type" content="website" />
<meta property="og:description" content="DESCRIPTION" />
<meta property="og:image" content="IMAGE URL" />
</head>
<body>
<script type="text/javascript">
if("false" == "false") {
window.location = "DESTINATION URL";
}
</script>
</body>
</html>
Where URL
is x.com/abc
And DESTINATION URL
is y.com/xyz
And you can check how Facebook reacts on that in FB debugger (also you can clear cache here): https://developers.facebook.com/tools/debug/