Welcome to Centmin Mod Community
Register Now

How to private or lock subdomain from public and search engine ?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by idanisur, Nov 27, 2019.

  1. idanisur

    idanisur New Member

    17
    4
    3
    Apr 15, 2019
    Ratings:
    +5
    Local Time:
    1:24 AM
    • Centmin Mod Version Installed: i.e. 123.09beta01
    I want to use wp2static (plugin) automatic deploy to netlify . so i am planing to create some sub-Domain for wordpress installation using my agency site Domain. I need to make those sub-Domain private, also hidden from search engine, as i will be using this just for sending static website to netlify.
     
  2. rdan

    rdan Well-Known Member

    4,731
    1,144
    113
    May 25, 2014
    Ratings:
    +1,708
    Local Time:
    3:24 AM
    Mainline
    10.2
    password protect via htpasswd?
     
  3. eva2000

    eva2000 Administrator Staff Member

    42,262
    9,550
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,708
    Local Time:
    5:24 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Just add to your subdomain's Nginx vhost server{} context the headers for noindex and nofollow that search engines look for
    Code (Text):
    add_header X-Robots-Tag "noindex, nofollow";
    

    then check the subdomain url's headers for the X-Robots-Tag via curl
    Code (Text):
    curl -I https://subdomain.domain.com/
    curl -I https://subdomain.domain.com/directory/
    
     
    • Like Like x 1