How do I fix facebook circular redirect?

Vivian

I did 4 landing pages on a website http://www.getyogi.fr/ and a php script randomize the differents landing pages.

But my problem is to fix the open graph facebook. He returns: Could Not Follow Redirect Path - Using data from http://www.getyogi.fr/lp1/ because there was an error following the redirect path.

Here is my open graph HTML:

<meta property="og:title" content="Le yoga en ligne">
<meta property="og:site_name" content="GET YOGi">
<meta property="og:url" content="http://www.getyogi.fr/">
<meta property="og:description" content="GET YOGi est un site pour pratiquer le yoga en ligne et prendre soin de vous où et quand vous voulez. Depuis votre mobile, votre tablette ou votre ordinateur, des cours HD disponible 24H/24, 7 jours /7.">
<meta property="fb:app_id" content="677363099034751">
<meta property="og:type" content="website">
<meta property="og:image" content="http://www.getyogi.fr/lp1/img/yoga1.jpg">

Anyone could help me ?

The1Fitz

The issue here is because of the URL you are using in your og:url. You say that you have a piece of PHP which randomizes a landing page and then redirects the user to that page. Here is what is happening:

  1. Crawler goes to https://your-url.com/
  2. Your PHP generates a landing page and redirects the crawler to https://your-url.com/landing-page-1
  3. On landing-page-1 the crawler sees the og:url is https://your-url.com/ which is considered the canonical URL so the crawler then goes there
  4. Now we are stuck in a loop between step 2 & 3

There are a couple of options you can do here:

Option 1: on your landing pages have the og:url be the URL of the landing page the user lands on.

Option 2: on the main URL have your randomizing PHP script ignore requests from the Facebook crawler which has a user agent of facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I fix this circular dependency?

From Dev

How to fix "requires valid redirect URI" at Facebook Share Dialog?

From Dev

Facebook Comments is giving "Warning: [URL] is unreachable." But Facebook Debugger is showing a Status 200 for the page. How do I fix this?

From Dev

How do I create a circular (endless) RecyclerView?

From Dev

How do I contain a circular gravity Field

From Dev

How do I make two circular borders?

From Java

How do I redirect with JavaScript?

From Dev

How do I fix this heart?

From Dev

How do I fix this formula?

From Dev

How do I fix these BSODs?

From Dev

How do I fix the KeyListener

From Dev

How do I fix a DivideByZeroException

From Dev

How do I fix this output?

From Dev

What do i enter as for the "redirect Url" when creating a Facebook service?

From Dev

How do I make the circle around my "i" perfectly circular?

From Dev

How can I add a redirect for after my Facebook page is liked?

From Java

How do I redirect to another webpage?

From Dev

How do I redirect to a custom url with nginx?

From Dev

How do I redirect visitors to login page?

From Dev

How do I redirect after download in Laravel?

From Dev

How do I redirect a string in Fish?

From Dev

How do I make a success redirect in htaccess?

From Dev

How do I redirect a Fragment to new Fragment?

From Dev

How do I use tee to redirect to grep

From Dev

How do I use tee to redirect to grep

From Dev

how do I redirect to the flask blueprint parent?

From Dev

How do I redirect command completion output?

From Dev

How do I redirect warnings in bash?

From Dev

How do I get the redirect url?