4

In SharePoint Online within the Administration Center, I can go to Search Center Settings and set a Search Center URL. I can do the same thing in the search service application for an on-premise instance of SharePoint 2013. I want all of my site collections by default to use this search center and this is the place to configure it.

This works great if I want Results.aspx to be the default page in my search center, but I do not. I have a custom page that I have added that I want to be the default page, but I don't see where I can make the setting to have all site collections use this page without visiting the configuration on each site collection.

I suppose I could rename Results.aspx to something else and rename my custom page to Results.aspx, but it seems like there should be a better way.

Is there a way to change the default page from Results.aspx to something else and only make this setting in one place (the search center)?

See also Manage the Search Center in SharePoint Online.

EDIT: FWIW, I looked at the SPWeb.AllProperties on a search center in my on premise SP2013 and didn't see any web property that indicated the default page was Results.aspx. There is a "__DefaultPageLayout" set to "_catalogs/masterpage/SearchResults.aspx", but I'm pretty sure that is not the answer. It could be that there is a web property for this whose default value is Results.aspx and can be added to be changed from the default. For that I might have to use a bit of reflection but it might be a dead end.

4 Answers 4

3

The Results.aspx page is hard-coded as the default page to goto when directing searches to a Search Center site. Your only option here is to make the changes you want to the Results.aspx page (and like you mentioned, maybe renaming the old one for posterity).

2
  • Thanks, John. Not the answer I wanted to hear, but hopefully a simple rename of files will do the trick. My default page that will be renamed to Results.aspx is not a web part page, but a totally custom ASPX page that just does some client side redirection based on some information it gathers. Hopefully being a different type of ASPX page is not an issue. Commented Nov 19, 2013 at 18:57
  • I renamed results.aspx to resultsprimary.aspx and renamed my custom page to Results.aspx. This worked well. The only thing that isn't perfect is that it still appears to require configuration for each site collection if you want the searches within them to automatically go directly to the search center instead of giving the user the option of going to the search center (by choosing Everything from the drop down). I guess I'll have to live with this. Commented Nov 19, 2013 at 21:43
0

You could also use a page redirect if that would be easier.

1
  • I assume you mean change the Results.aspx page into a redirect page since the problem is the entry point appears to be Results.aspx with no way to change this (without touching every site collection). My custom page is essentially a smart redirect page so I'll see if I can rename it to Results.aspx and see what happens. Commented Nov 19, 2013 at 20:08
0

Go to Site Settings. Under search settings use "Send queries to custom results page URL".

0
  1. Create a new page. ex. custom-search
  2. Go to insert > web part > search > search results > then look to right and click add.
  3. Change site search page by going here. _layouts/15/enhancedSearch.aspx?level=site
  4. get the url of the page you just created, and paste it in "Search Center URL:" and check send queries and paste the same URL in that box and press ok.
1
  • It has been a long time since I asked the question, but if memory serves me correctly, going to enhancedSearch.aspx and changing the Search Center URL will change how searches in that site or site collection will be redirected. If I have a common search center for all of SharePoint, I would have to make this configuration change on every site collection. Granted, through scripts I could probably walk all site collections and make this change, but then newly created site collections would not get the benefit of it. I think the approach of renaming Results.aspx is probably best for this case. Commented Mar 19, 2015 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.