I have a website. It is working fine. But since yesterday, If I click on Google Search Result webpage link of my website, then it shows following error:

It appears you don't have permission to access this page. 403 Error. Forbidden.

If I share webpage link of my website in my Facebook page and then If I click on the shared webpage link, it also shows the same above error.

However in both cases, If I copy the link of webpage link (from google search results or Facebook page) and paste in browser. Then it opens fine with out showing any error.

I am using Hostgator Shared Hosting.

I am really puzzled, why this is happening?

  • Welcome to Webmasters! Wow. What a dilemma. Unfortunately, there is not enough actionable detail for us to really know. I would suggest looking at your log files and .htaccess file for clues. You may want to call Hostgator. As of right now, short of a bad rule in the .htaccess file, I have no ideas. If I think of one, I will certainly come back to you. Cheers!!
    – closetnoc
    Sep 22, 2019 at 13:59
  • Hey Sir. Thanks for your comment. If there is any mistake in htaccess file, then the webpages should not open in the browser. But it is opening fine. The problem is the links present in Google Search results of my website, if clicked then shows the mentioned error. Similarly if links shared on facebook page, clicked then also shows same error message.
    Sep 22, 2019 at 15:15

1 Answer 1


Finally I have figured out the solution to this problem. I am posting the solution if any one might landup in same situation then it would help.

The problem was in my htaccess file, I have a line which restricts hotlinking. In that line, I have listed all files which I do not want any other website to link. Such as JPEG File, PDF File, PNG file, etc. But strangely, I noticed, "PHP" has been added to the line.

The moment, I removed php from the htaccess, it worked immediately.

I was happy that my problem solved but now worrying, how come php is added to the line in htaccess file. I have following questions in my mind.

  1. Is it possible for hackers to change the htaccess?
  2. Because I am on shared hosting, that company people might have done this to earn some money in the pretext of helping me out from the situation. This strategy has become part of marketing strategy.
  3. I doubt, some other website owner who has their website on same shared hosting, might have managed to access my website, and have done this?

But any ways, the solution is to check htaccess file. THanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.