Use subdomain to route requests

Hey there,

I have a doubt if it’s possible to use subdomain to route a service.

My set is: (A - IPv4 Address) ->… (Kong Load balancer, created with AWS CloudFormation)

I need to call my service, let’s say service1, but I would like to register it as subdomain, instead of using

Is that a way to do that?

Thanks in advance

If I am reading this correctly you would like to declare a service with a subdomain in its host name? I do not see any issues with that. in the URL option of a service resource when creating just do for example.

Now if you want your gateway hostname to support routing based on a fresh subdomain on the gateway itself Kong does not do that that I am aware of now.(ex: And I see it really as an aesthetic and not a functional need?

Yes, would be aesthetic! Thanks for the answer!

Hello @thiagoretondar

I’ve a different interpretation of your post from @jeremyjpj0916 which could be wrong. If so, please ignore this post.

Here’s what I understand:
You’ve a Kong cluster running at and now you want to transform to

You could point CNAME your to and then have a Kong routing rule to route all requests with Host as to a service http://upstream/service1 .

1 Like

Hi @Thaigoretondar,

I’m actually hoping you can help me with just getting SSL routed through to see our GUI dashboard and proxy URL. Did you setup a 443 listener and 8444 target group? or is there something else you need to do to get traffic through?

Hi when using subdomain should it be set in the host parameter when creating kong service or is this set in the host in kong route. I am using the latest kong 1.1. Thanks.