SharePoint 2010 missing host header?

I am trying to resolve some of the problems I am having in my environment and I think it is all related to a possible host header misconfiguration.

When I run the following code in my environment:

$wa = get-spwebapplication “http://mywebapp”
$iissettings = $wa.GetIisSettingsWithFallback("Default")

Open in new window

I get the following result:

HostHeader   Port UpgradedPersistedProperties             
----------   ---- ---------------------------             

Open in new window

I guess that suggests that my host header is missing? How do I fix it?
Who is Participating?
manojceConnect With a Mentor Commented:
So please add hostheader entry in that file.       mywebapp

Can you see the hostheader entry in Central Admin Site ?

Are you sure, you have configured HostHeader entry in IIS & Central Admin Site ?

Also you can configure host header using below powershell commands.

Let me know if you have any issue.

MisUszatekAuthor Commented:
Everything looks ok in Central Admin (host header and AAM) and IIS (bindings). It is possible that something was changed manually and not properly reflected in the configuration database. How do I fix it for the existing production web app?
Please double check hostheader entry in "C:\Windows\System32\drivers\etc\hosts" file.

and compare with older file.
MisUszatekAuthor Commented:
I do not see any host headers in the hosts file...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.