Path Variable on Domain

Hi everyone. Happy Monday!

I know I can use PATH variables and it works great, but I can’t seem to use it to change the subdomain of a URL, for example here.

the :variable doesn’t work for the subdomain, only for parameters afterward.

is it possible at all?

Hi @lunar-module-admin10. Welcome to the Postman Community!

This isn’t possible because technically, the subdomain or domains are not URL paths. The path variable works specifically with URL paths.

Is there a specific reason why you want to use the path variables for the sub domain and not the other types of variables Postman provides?

1 Like

Thanks for the answer. I thought that would be the case, as I researched this for a long time before asking here :frowning:

Reason I need it is that I need to change the subdomain for different ones all the time and there are many. I won’t create environments for each. That would be too much.

Thank you again!

I’m glad I was able to help @lunar-module-admin10.

For your usecase, you should consider using collection variables.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.