Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6855349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:44:50+00:00 2026-05-27T01:44:50+00:00

I have a secure link direction service I’m running ( expiringlinks.co ). If I

  • 0

I have a secure link direction service I’m running (expiringlinks.co). If I change the headers in php to redirect my visitors, then facebook is able to show a preview of the website I’m redirecting to when users send links to one another via facebook. I wish to avoid this. Right now, I’m using an AJAX call to get the URL and javascript to redirect, but it’s causing problems for users who don’t use javascript.

Here are a number of ways I’d like to block facebook, but I can’t seem to get working:

  1. I’ve tried blocking the facebook bot (facebookexternalhit/1.0 and facebookexternalhit/1.1) but it’s not working, I don’t think they’re using them for this functionality.

  2. I’m thinking of blocking the facebook IP addresses, but I can’t find all of them, and I don’t think it’ll work unless I get all of them.

  3. I’ve thought of using a CAPTCHA or even a button, but I can’t bring myself to do that to my visitors. Not to mention I don’t think anyone would use the site.

  4. I’ve searched the facebook docs for meta tags that would “opt-me out”, but haven’t found one, and doubt that I would trust it if I had.

Any creative ideas or any idea how to implement the ones above? Thank you so much in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:44:51+00:00Added an answer on May 27, 2026 at 1:44 am

    Try this – it works for me …

    <?php 
    $ua = $_SERVER['HTTP_USER_AGENT'];
    
    if (preg_match('/facebookexternalhit/si',$ua)) { 
    header('Location: no_fb_page.php'); 
    die() ; 
    } 
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF client/service app that relies on secure communication between two machines
I have this link on my page (page1): <a href=@{Controller.action1().secure()}>Link1</a> that takes me to
Is it possible to have secure authentication without using session, cookies and SSL ?
I have a website which allows secure (ssl) file uploads and download. The site
I have a web application which contains both secure (SSL) and non-secure pages. A
I have an assignment to create a secure communication between 2 people with a
I have a jQuery script: $.ajax({ url: /scripts/secure/development/ajax.asp, type: POST, dataType: text, data: cmd=addresses,
I have a page on a website that contains a secure form inside an
I have to write an application that implements a secure connection between client and
We have some legacy ASP.NET code that detects if a request is secure, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.