LudvigH
LudvigH

Reputation: 4800

Powershell Invoke-WebRequest returns "remote name could not be resolved" but not proxy error

I am trying to download a page using wget (alias for Invoke-WebRequest) in powershell. The page in question is www.privatahyresvärdar.nu.

When using Internet Explorer I can navigate to www.privatahyresvärdar.nu but I cannot run wget from powershell nor can i ping the site. Neither command can resolve the hostname.

I have followed several advice on SO and other sites commenting on using Proxies as an error source for wget failing, but i am not using any Proxy.

Please help me identify the error source!

Upvotes: 1

Views: 13933

Answers (1)

LudvigH
LudvigH

Reputation: 4800

After a moment of clarity it struck me that it might be an encoding error! After replacing the hostname with punycode with an online punycode encoder (first hit on google) it worked like a charm!

enter image description here

Upvotes: 5

Related Questions