Is it possible to set the Site Homepage default by user or group?
Asked by Digilant Admin:

We have 2 different companies owned by a holding company and we want to make it so when people from one company logs in, they are directed to one Home Page and when the other logs in, they are directed to another. I know it is possible for a user to override the default homepage by going into their profile settings, but we would like to do this administratively. possibly by assigning users in a group or role. Is this possible? I have not been able to find any information on the matter.


Answers:
author: Davin Studer
body: You could do this with a little bit of wiki ingenuity. First you will need to create a user macro for redirecting users. You can use the one below that was created by @Stephen Deutsch. You will also need the [Visibility](https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.visibility/server/overview) add-on. Next create a landing space and make that the default space in Confluence Admin (everyone needs view access to this space). On the home page of that space you will use the show if macro from the Visibility add-on combined with the redirect macro like such ...

image2016-6-9 15:32:26.png

Redirect User Macro

**Macro Name:**redirect_macro

**Macro Title:**Redirect Macro

**Macro Body Processing:**   
No macro body

**Template:**

```
## Macro title: Redirect Macro## Body processing: N#### Developed by: Stephen Deutsch#### This macro redirects the user from the current page to a new page defined in the options.## This macro more or less duplicates the functionality of the ServiceRocket Redirection Plugin## Copyright 2014 zanox AG## ## Licensed under the Apache License, Version 2.0 (the "License");## you may not use this file except in compliance with the License.## You may obtain a copy of the License at## ##     http://www.apache.org/licenses/LICENSE-2.0## ## Unless required by applicable law or agreed to in writing, software## distributed under the License is distributed on an "AS IS" BASIS,## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.## See the License for the specific language governing permissions and## limitations under the License.## @param location:title=Location|type=string|required=true|desc=The URL to redirect to## @param delay:title=Delay|type=string|default=0|desc=The number of seconds to delay before redirecting the browser.#set ( $Integer = 0 )#set ( $delay = "0" )#set ( $delay = $paramdelay )#set ( $delay = $Integer.parseInt($delay) * 1000 )#if ( $req.getParameter('redirect') != "false" )  &lt;script&gt;  setTimeout(function() {    window.location = "$paramlocation";  }, $delay);  &lt;/script&gt;#end&lt;ac:macro ac:name="note"&gt;  &lt;ac:parameter ac:name="title"&gt;Redirection notice&lt;/ac:parameter&gt;  &lt;ac:rich-text-body&gt;    &lt;p&gt;This page will redirect to &lt;a href="$paramlocation"&gt;$paramlocation&lt;/a&gt; in about $delay seconds.&lt;/p&gt;  &lt;/ac:rich-text-body&gt;&lt;/ac:macro&gt;
```

[](https://community.atlassian.com/t5/Confluence-questions/Is-it-possible-to-set-the-Site-Homepage-default-by-user-or-group/qaq-p/133745?attachment-id=2913){#link_1186d0079f1e7a}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/22203/1/image2016-6-9%2015%3A32%3A26.png){#display_1186d0079f1e7a_0}

comments: author: Digilant Admin
body: Thanks @Davin Studer this is quite helpful. I tried it and got it to work! I created a test group and added myself and it did indeed redirect. My only question is, what if they need to view that specific Space at some point? Is it not possible once the Macro has been set?


author: Davin Studer
body: That is true. I would tend to make this landing space only for the purpose or redirection. If you want another common space that should be a different space. It's not totally ideal, but it's the only way I know to do it short of writing your own add-on.


author: Digilant Admin
body: Gotcha. Hopefully they can integrate something like this into Confluence at some point. Thanks for the help!


author: Mike McNamara
body: I was able to create a browser shortcut for specific users who we were restricting to one space only. This allows them to hit that space's main page right away. Prior to this, these users tried to hit the site homepage configured in the Confluence settings when they went to our base URL, and would get a page not found message in Confluence.

So this is one option for a solution.


Tags: confluence-administration