Can you specify a variable under Host in IIS Binding?

Hello. I’m trying to set up a binding in OD, which needs to change based on the environment it is being deployed to. For example:

On Dev, the binding host should be…
On Test, it should be
On Prod, it will be

My proposal is to make a variable that has ‘dev.’, ‘test.’, and ‘’ as values for each of the three environments, called, say, hostEnvironment, and then plug in sitename.#{hostEnvironment} as the name of the host under IIS Bindings under the Deploy Package step.

The problem is that when I try this on my project, it deploys it to sitename.#{hostEnvironment}, instead of transforming #{hostEnvironment}. Am I trying to do something not supported, or am I doing something wrong?

Hi Jeremy,

Thanks for reaching out! Could you please follow these steps so we can help with the troubleshooting:

  1. Add these variables to your project:

  2. Create a new release (so the new variables take effect) and deploy it.

  3. Send us the raw log of the deployment



Thanks for the quick reply. Turns out the problem here was a loose nut behind the keyboard (i.e., me), and I fixed it. Note: Don’t name variables #{variable}. That breaks things…

Glad to hear you solved it! We are all guilty of having named variables #{Variable}, #{var} & #{v} at least a couple times in our lives :wink: