Get the most out of your Centmin Mod LEMP stack
Become a Member

Nginx Block bad referer behind Cloudflare

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Nov 15, 2017.

  1. pamamolf

    pamamolf Well-Known Member

    2,778
    245
    63
    May 31, 2014
    Ratings:
    +437
    Local Time:
    10:03 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hello :)

    I just notice using google that a domain has a bad reference :(

    bad referer:

    and is loading the same content and when i post something on the main forum i can see it at the same time on the bad domain....

    Searching around i found two solutions one with htttp referer block and anothe one using map both for nginx.....

    That solution was working in the past on another domain.....

    The issue now is that the bad referer domain is behind cloudflare and it doesn't seem to get blocked using the domain name.... :(

    Any ideas how i can block that?

    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,630
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,307
    Local Time:
    6:03 AM
    Nginx 1.13.x
    MariaDB 5.5
    you mean tried https://community.centminmod.com/threads/someone-mirrored-my-website.7140/ ?

    and the bad referrer domain that is mirroring your site is behind cloudflare ? should be blocked regardless, unless there's more than one bad referrer domain i.e. baddomain1.com mirror your domain.com but they also setup baddomain0.com to mirror so that baddomain1.com mirrors baddomain0.com which mirrors yourdomain.com. So while you're blocking baddomain1.com, it still gets content off baddomain0.com

    probably need to dig into your nginx logs to check domains/ips pulling your content

    to protect your SEO, make sure to follow https://community.centminmod.com/threads/someone-mirrored-my-website.7140/#post-30365
     
    • Informative Informative x 1
  3. pamamolf

    pamamolf Well-Known Member

    2,778
    245
    63
    May 31, 2014
    Ratings:
    +437
    Local Time:
    10:03 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Ok i found the ip and block the bad referrer :)

    Is there an easy way to found all domains that point to my server using an A record?
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,630
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,307
    Local Time:
    6:03 AM
    Nginx 1.13.x
    MariaDB 5.5
    no easy way