twoconk
V2EX  ›  问与答

我的网站被其他域名访问,有什么办法?

  •  
  •   twoconk · Feb 3, 2016 via Android · 1836 views
    This topic created in 3947 days ago, the information mentioned may be changed or developed.
    我的网站 http://iscxy.com 刚上线就发现 http://cd360.tv/ 也能访问,刚开始没注意,最近发现在百度关键词搜索后,这个域名还排在 iscxy.com 前面,也不是 dns 跳转,难道是抓取后缓存?有什么办法么?
    29EtwXn6t5wgM3fD
    29EtwXn6t5wgM3fD
    Feb 3, 2016 via Android
    1
    直接访问你网站 ip 是什么样
    twoconk
    twoconk
    OP
    Feb 3, 2016 via Android
    2
    @shengyu ip 访问没有问题 ,和域名访问一样的
    jsq2627
    jsq2627
    PRO
    Feb 4, 2016
    3
    在你 nginx 配置里 server_name 指明绑定域名,这样其他域名绑定到这个 IP 上就访问不了了。
    此外最好在前端 JS 也判断一次当前域名,如果不正确那就跳转回正确的域名。
    twoconk
    twoconk
    OP
    Feb 4, 2016 via Android
    4
    @jsq2627 感谢, servername 指定过了
    js 判断应该是个办法,回头试试
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2361 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 13:51 · PVG 21:51 · LAX 05:51 · JFK 08:51
    ♥ Do have faith in what you're doing.