I have been to many website and gathered a lot information to get this done, bascically when u make a website avalabe, the search function is not working or not working for anonymous user or not working at all. If it is not working at all, please check my another post. – https://rockyoz.wordpress.com/2012/01/27/sharepoint-public-website-customization-bloody-hell/
FYI, it is not hell any more 🙂 It is like heaven right now lol.
My situation is when search function is worked for users, it is not work for anonymous.
So to fix it.
1. go to site settings->site aministration-> search and offline avalability-> Always index all Web Parts on this site tick
2. go to site settings->Site Collection administration->Site Collection FEature->Search Server Web Parts ->active
3. create another publish page, maybe just use main body, insert webpart->Search->Search Core Results
4.Search Core Results ->Location properties->Local Search Results
5.Score -> All sites( you can go to Site Settings->Site Collection Administration->Search Scopes) . Save it and Publish the Page.
6. Site Settings->Search Settings->Site Collection Search Results Page-> type in the search page u just created, done!