Every time I tried to do a search on my SharePoint server, it came back with an error as follows:
“The Web application at http://sharepoint.domain.local/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.”
For a while it had me beaten. Then I realised the problem – elements of SharePoint will not work properly if the Internal FQDN (Fully Qualified Domain Name) is used from a browser instead of the Host name, because elements of SharePoint will only work when using the pre-defined names it knows. To illustrate the point, by connecting to the server via http://sharepoint/, the search process worked perfectly.
So how to fix this? In an ideal world you want to be able to have SharePoint working fine on the Hostname, the Internal FQDN and [depending on your setup] the external FQDN. And here is how you do it……
1) Fire up the SharePoint Central Administration.
2) On the opening page, look under the System Settings heading for Configure alternate access mappings.
3) From here you can edit, add or ‘map to external resource’ a URL. In this case, I am going to add a URL for my internal FQDN. So I click Add Internal URLs.
4) Next, you need to select the entry for Alternate Access Mapping Collection. I click the drop down link to do this and use the change option, and in the proceeding window select my main SharePoint site. This then takes me back to the previous window with this option selected.
5) In the field for Add Internal URL, I need to add my FQDN, protocol and port number. As I am operating on port 80 / http, this is set as: http://sharepoint.domain.local:80. My required domain is internal, so from the zone list I select Intranet then click on Save.
6)You’re done! Fire up a browser using the newly added domain name, and you will find all should now work. Note that if you are applying an internal domain name that is completely different from the SharePoint host name, you will need to make changes to your DNS servers records to reflect this, or else the name won’t resolve.