A bit off topic for me (I am by no means a Sharepoint Expert, I used it only for a couple of hours now…), but I ran into this issue and it took me quite some figuring out. I configured a new Sharepoint Foundation 2010 Site, but for some reason the search threw the following error:
The Web application at http://external_url_to_my_site/ 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.
Ok, so I contacted my sysadmin who is … me. That didn’t help 🙂
First I tried configuring Search Services (and found some posts on that, such as this one: http://www.anmolrehan-sharepointconsultant.com/2012/01/sharepoint-configuring-foundation.html) and I even contemplated installing Microsoft Search Server 2010 Express (here: http://www.microsoft.com/en-us/download/details.aspx?id=18914). But in the end it was not that complicated. I had to configure Alternate Access Mappings. Here’s how to do that.
On the server, open the Sharepoint 2010 Central Administration, navigate to Application Management. Under the heading “Web Application” click “Configure alternate access mappings”.
Now you can specify the mapping of public urls to internal urls, for different zones in the site. Default, the internal URL is the same as the public URL. Now the trick: choose “Add Internal URLs” and specify the external url in the textbox. Choose “Internet” (or any option but Default) for the zone.
In the overview of Mappings, you should have (at least) two entries:
- One specifying your internal URL (http://local_machine_name/) for zone Default with Public URL http://local_machine_name.
- The second specifying your external URL (http://www.external_url.com/) for zone Internet with Public URL http://www.external_url.com.
That worked for me, although I don’t begin to understand the logic behind this.