You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
We recently created a new space by cloning an old space. The new space has a new spacekey, obviously.
My problem is, the old spacekey is still showing up in searches like Google. What I want to do is when users click the old spacekey from the search result, they will be redirected to the new space. Is there a way to do this en mass for the entire space? I know we can use the redirect plugin for a page, but I don't wanna create a redirect for each and every page of the entire space.
I've also tried blocking the old space from public view, but then it still shows up in Google searches.
Hello Abraham,
If you’re wanting to take users who navigate to a ‘page” from google and send them to a new ‘page’ or space within Confluence then you’ll need to use javascript customization within your old space to forward/redirect your users to the new space. Stephen Brannen wrote up an answer previously about doing this which should still be applicable now. You may find this post at How to apply redirection on all pages on a space? Within there the following is referenced:
You will want to paste the following into the 'At the end of the HEAD' section of the Custom HTML section of the Confluence Administration screen.
<script type="text/javascript"> function Redirect(newUrl, path) { window.location = newUrl + path; } space = "TEST"; if (space == AJS.params.spaceKey) { var newUrl = "http://new.confluence.com" var path = window.location.pathname; Redirect(newUrl, path); } </script>If you would prefer to warn users, you could use an Alert and set a timeout like below:
<script type="text/javascript"> function Redirect(newUrl, path) { window.location = newUrl + path; } space = "TEST"; if (space == AJS.params.spaceKey) { var newUrl = "http://new.confluence.com" var path = window.location.pathname; alert("You will be redirected to the new page location in 3 seconds."); setTimeout('Redirect(newUrl, path)', 3000); } </script>
Please let us know if this example works for your needs and assist with redirecting traffic from your old Confluence space to the new space.
Regards,
Stephen Sifers
Hi Stephen,
We made a couple of tweaks and then it worked! Thanks very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If like many server clients you have moved to cloud you will discover what Stephan suggests is impossible. You don't have that level of customization in cloud.
We built a redirection app called Redirection by Easy Apps and learned all about what can and cannot be done in cloud. What can be done is not technically a redirect. But you do not need any technical knowledge to use it, it's built to that marketing and a cross section of team members can use it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.