Support » Plugin: WP Fastest Cache » Does WP-Fastest cache block Facebook bots?

  • Resolved Tyler Rosier

    (@unitedbybass)


    Hey all,
    I have been dealing with this issue for about 3 weeks now and have tried everything I can think of which leads me to here. None of my posts on my site are able to be read by the facebook bot anymore and the result is no image preview when sharing to facebook.

    I have debugged the link and rescraped it 100 times with the same resulting error: Provided og:image URL, https://www.unitedbybass.com/wp-content/uploads/2019/02/MFReleaseFB.jpg could not be processed as an image because it has an invalid content type.

    After contacting Facebook we realized that their bot wasn’t able to read our meta tags correctly and was instructed to update our robots.tx file which we have done. After we did this we were able to share one post on facebook correctly and then it went back to the same issue.

    I just looked at our htaccess file and am seeing this line:
    RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit|Twitterbot|LinkedInBot|WhatsApp|Mediatoolkitbot)

    Can someone explain what this is doing and if this is the reason that the Facebook bot is having trouble?

    I have also copied the entire htacces file below. I am at a loss and have been slamming my head against my desk for weeks on this. Please help

    # BEGIN WpFastestCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTPS} =on
    RewriteCond %{HTTP_HOST} ^www.unitedbybass.com
    # Start WPFC Exclude
    # End WPFC Exclude
    # Start_WPFC_Exclude_Admin_Cookie
    RewriteCond %{HTTP:Cookie} !wordpress_logged_in_[^\=]+\=tyler
    # End_WPFC_Exclude_Admin_Cookie
    RewriteCond %{HTTP_HOST} ^www.unitedbybass.com
    RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit|Twitterbot|LinkedInBot|WhatsApp|Mediatoolkitbot)
    RewriteCond %{HTTP_USER_AGENT} !(WP\sFastest\sCache\sPreload(\siPhone\sMobile)?\s*Bot)
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{REQUEST_URI} !(\/){2}$
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond %{QUERY_STRING} !.+
    RewriteCond %{HTTP:Cookie} !comment_author_
    RewriteCond %{HTTP:Cookie} !safirmobilswitcher=mobil
    RewriteCond %{HTTP:Profile} !^[a-z0-9\”]+ [NC]
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f [or]
    RewriteCond /home/tatluxffs22c/public_html/wp-content/cache/all/$1/index.html -f
    RewriteRule ^(.*) “/wp-content/cache/all/$1/index.html” [L]
    </IfModule>
    <FilesMatch “index\.(html|htm)$”>
    AddDefaultCharset UTF-8
    <ifModule mod_headers.c>
    FileETag None
    Header unset ETag
    Header set Cache-Control “max-age=0, no-cache, no-store, must-revalidate”
    Header set Pragma “no-cache”
    Header set Expires “Mon, 29 Oct 1923 20:30:00 GMT”
    </ifModule>
    </FilesMatch>
    # END WpFastestCache
    # BEGIN GzipWpFastestCache
    <IfModule mod_deflate.c>
    AddType x-font/woff .woff
    AddType x-font/ttf .ttf
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
    AddOutputFilterByType DEFLATE font/opentype font/ttf font/eot font/otf
    </IfModule>
    # END GzipWpFastestCache
    # BEGIN LBCWpFastestCache
    <FilesMatch “\.(webm|ogg|mp4|ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)(\.gz)?$”>
    <IfModule mod_expires.c>
    AddType application/font-woff2 .woff2
    ExpiresActive On
    ExpiresDefault A0
    ExpiresByType video/webm A10368000
    ExpiresByType video/ogg A10368000
    ExpiresByType video/mp4 A10368000
    ExpiresByType image/webp A10368000
    ExpiresByType image/gif A10368000
    ExpiresByType image/png A10368000
    ExpiresByType image/jpg A10368000
    ExpiresByType image/jpeg A10368000
    ExpiresByType image/ico A10368000
    ExpiresByType image/svg+xml A10368000
    ExpiresByType text/css A10368000
    ExpiresByType text/javascript A10368000
    ExpiresByType application/javascript A10368000
    ExpiresByType application/x-javascript A10368000
    ExpiresByType application/font-woff2 A10368000
    </IfModule>
    <IfModule mod_headers.c>
    Header set Expires “max-age=A10368000, public”
    Header unset ETag
    Header set Connection keep-alive
    FileETag None
    </IfModule>
    </FilesMatch>
    # END LBCWpFastestCache

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    RewriteCond %{HTTP_REFERER} !^http://unitedbybass.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://unitedbybass.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.unitedbybass.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.unitedbybass.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^https://unitedbybass.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^https://unitedbybass.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^https://www.unitedbybass.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^https://www.unitedbybass.com$ [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ – [F,NC]

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Emre Vona

    (@emrevona)

    The rules are not related “blocking” any bots. Just the facebook bot does not see the cached version of the page.

Viewing 1 replies (of 1 total)
  • The topic ‘Does WP-Fastest cache block Facebook bots?’ is closed to new replies.