# How to set/override host in kong ingress, which will set the host in kong services

**URL:** <https://discuss.konghq.com/t/how-to-set-override-host-in-kong-ingress-which-will-set-the-host-in-kong-services/7478>\
**Category:** Questions\
**Created:** [November 21, 2020, 2:47am UTC](https://discuss.konghq.com/t/how-to-set-override-host-in-kong-ingress-which-will-set-the-host-in-kong-services/7478 "2020-11-21T02:47:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![on\_fla](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@on\_fla](https://discuss.konghq.com/u/on_fla)\
**Post date:** [November 21, 2020, 2:47am UTC](https://discuss.konghq.com/t/how-to-set-override-host-in-kong-ingress-which-will-set-the-host-in-kong-services/7478/1 "2020-11-21T02:47:57Z")

</div>

I have a ingress as follows:

```auto
     apiVersion: extensions/v1beta1
     kind: Ingress
     metadata:
            name: sample-ingress
            namespace: sample
     spec:
       rules:
       - http:
           paths:
           - backend:
               serviceName: test
               servicePort: 80
             path: /test

This will create the entry for the service object in the database as below.
`{"host":"sample.test.80.svc","id":"6c66b65d-93bb-4927-9331-d95c02834ad6","protocol":"http","read_timeout":60000,"tls_verify_depth":null,"port":80,"updated_at":1605744279,"ca_certificates":null,"created_at":1605744279,"connect_timeout":60000,"write_timeout":60000,"name":"sample.test.80","retries":5,"path":"\/","tls_verify":null,"tags":["managed-by-ingress-controller"],"client_certificate":null}`

Here, host is configured with `sample.test.80.svc` rather than this, I want to forward the traffic to some other service. 

Service where request needs to be routed is as below:
     apiVersion: v1
     kind: Service
     metadata:
       name: test
       namespace: sample
     spec:
       externalName: foo.example.com
       sessionAffinity: None
       type: ExternalName

How can I achieve it? Thanks.
```
