I don't know what's wrong. I don't get any warnings in logs. I've similar config to this How to exclude specific subdomains server_name in nginx configuration
I want to create subdomain us.example.io I'm using ping to check it
ping us.example.io
ping: cannot resolve us.example.io: Unknown host
nginx.config
 server {
    server_name *. us.example.io us.example.io;
    listen 80;
    root /usr/share/nginx/html/bint;
    index index.html index.htm index.php;
    location / {
      try_files $uri $uri/ /index.html;   
    }
  }
  server {
    server_name us.example.io;
    listen 80;
    return http://www.google.com;
  }
 
     
    