title: Redirect from an IP address to a domain
body: <p>How can I redirect a page from an IP address to domain name <em>my.page.com</em>? Everything works when I open the page via <em>my.page.com</em>. When I open via the IP address I get &quot;incorrect certificate &quot;CN = Kubernetes Ingress Controller Fake Certificate
  O = Acme Co&quot;.</p>
  <p>I want only to redirect people from an IP address to a domain.</p>
  <p>`apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
  name: web-ingress
  annotations:
  kubernetes.io/ingress.allow-http: &quot;false&quot;
  nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTPS&quot;
  spec:
  tls:</p>
  <ul>
  <li>hosts:
  <ul>
  <li>my.page.com
  secretName: tls-secret
  rules:</li>
  </ul>
  </li>
  <li>host: my.page.com
  http:
  paths:
  <ul>
  <li>path: /api
  backend:
  serviceName: api
  servicePort: 8090</li>
  <li>path: /
  backend:
  serviceName: app
  servicePort: 8080`</li>
  </ul>
  </li>
  </ul>
  <p>I installed Ingress from <a href="https://kubernetes.github.io/ingress-nginx/deploy/" rel="nofollow noreferrer">here</a>.</p>