Learn about Centmin Mod LEMP Stack 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:
    8:23 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,104
    1,264
    113
    May 25, 2014
    Ratings:
    +1,932
    Local Time:
    10:23 PM
    Mainline
    10.2
    password protect via htpasswd?
     
  3. eva2000

    eva2000 Administrator Staff Member

    47,474
    10,760
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,718
    Local Time:
    12:23 AM
    Nginx 1.19.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/