How to remove the '/forum' showing up in search engines?

the main result for my forum shows as rather than

There is nothing at other than a php 301 redirect to

How do I eventually get google to display the forum homepage as just in the results?

Would URL rewrite rules in the .htaccess work? or will I just have to create lots of backlinks to instead of

The funny thing is, I have seen other XF forums that redirect their domains straight to /forums (and still shows the /forums in the URL bar), yet the result for their main page in google is without the /forums. How do I achieve this?

Thanks !


XenForo moderator
Staff member
Is there a reason why you don't want to have the installation in the root instead of a sub-directory?
I can move it to the root, but the problem with that is that the forum is full of posts and members so it will likely cause a range of problems if moving it to the root directory now. The first one being that the links would be broken if people arrive at one of my threads via google, atleast until the spider comes back to my site. Others have also linked to specific threads in my forum on other sites, so those links would break too.

So rather then having to deal with all that, I was wondering how I could simply force google to show my main result for my homepage as just I dont actually mind if the /forum is still shown for specific thread results shown in google, or if it still shows in the URL bar.

Here is an example of what im trying to achieve (this is not my site): rewrite for SEO?#sclient=psy&hl=en&safe=off&rlz=1C1SNNT_enAU414&q=hax scene&aq=f&aqi=g1g-j1&aql=&oq=&pbx=1&fp=e807647f54fc789f

as you can see the result shows just the main URL yet when clicking on it it still redirects to /forums.



XenForo moderator
Staff member
The second result on that link shows the /forums in the URL.


It's only the domain root which doesn't, and that simply has a redirect in place to forward the browser to the forum index.
Exactly. I am only talking about how the first result. I dont mind if the others have the word "forum" in it, or if it redirects to /forums.

Thats why its stange, because I also have a redirect to /forum in the root directory, just like that site i linked above. Yet my result shows the /forum for the first result, and that site doesnt, even though we both have the same redirect to the forum.

The reason why this is such a problem for me is because my domain has the word 'forums' in it already, so the first result in google actually shows as Which looks terrible with the duplicate word.

Hope that helps


XenForo moderator
Staff member
Are you sure the main URL isn't just further down the list?

Try doing a site specific search to see if it appears.
Nevermind, I took you up on your suggestion and just moved my entire board to the root and did a 301 permanent redirect if anyone tries to go to /forums. This is probably the only way to get google to make the change in its results. Anything else and it wouldnt of been guaranteed to happen. I have to manually change some URLS on other sites, but no big deal, just glad its sorted now. thanks for your help :)