Join the community today
Become a Member

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:
    3:52 PM
    • 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

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    5:52 PM
    Mainline
    10.2
    password protect via htpasswd?
     
  3. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    7:52 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    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/