<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
 annotations:
  nginx.ingress.kubernetes.io/rewrite-target: /
  ingress.bluemix.net/rewrite-path: "serviceName=nginx rewrite=/"
 name: nginx-ingress 
 namespace: 'default'  
spec:
 rules:
 - host: www.domain.com
   http:
     paths:
     - path: /*
       backend:
         serviceName: nginx
         servicePort: 80
</code></pre>

<p>Here I have some ingress config <code>yaml</code> file. When I apply it all working correctly but only when you go by path <code>www.domain.com</code> , when I try to use <code>domain.com</code> , it doesn't work and return me </p>

<blockquote>
  <p>default backend - 404</p>
</blockquote>

<p>What should I do ? Add one more host to the rules: </p>

<pre><code> - host: domain.com
   http:
     paths:
     - path: /*
       backend:
         serviceName: nginx
         servicePort: 80
</code></pre>

<p>Like this or I can use better solving of this problem ? </p>

Andrey Radkevich
<p>add an ingress alias annotation to the <code>annotations</code> block:</p>

<pre><code>nginx.ingress.kubernetes.io/server-alias:  domain.com
</code></pre>
