When creating a new WCF and hosting locally or dev/prod server you might come across an issue where WSDL will display a URL with computer/local name which is different to URL of service
Fro example actual URL might be
And WSDL URL will be
To fix this we can add following configuration in serviceBehaviors section of config
<serviceBehaviors>
<behavior>
<serviceMetadata httpsGetEnabled=”true”/>
<useRequestHeadersForMetadataAddress>
<defaultPorts>
<add scheme=”https” port=”443″/>
</defaultPorts>
</useRequestHeadersForMetadataAddress>
</behavior>
</serviceBehaviors>