How to redirect subpages automatically from non-www to www url?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
7/12/2010 6:51:59 PM
Gravatar
Total Posts 137
When enough isn't

How to redirect subpages automatically from non-www to www url?

Hi

In order to ensure good results in google you need to avoid two competing identical pages with or without www.

How do you setup Mojoportal to make that 301-redirect automatically: http://my-page.com/somepage.aspx redirects to http://www.my-page.com/somepage.aspx ?

The function you today find in Mojoportal that indicates preferred domaine gives very bad redirect results that completely ruins your google indexing. Example, try to write http://www.mojoportal.com/documentation.aspx and then remove the www so it says: http://mojoportal.com/documentation.aspx. You will then be redirected to http://www.mojoportal.com and not http://www.mojoportal.com/documentation.aspx. This is very bad for your indexing in Google even if you teel google webmaster tool that your preferred domain is www.mojoportal.com.

But as I started. The simple question is how do you redirect the subpages automatically from non-www to www in the url?

Best regards

Lars

7/13/2010 6:20:12 AM
Gravatar
Total Posts 18439

Re: How to redirect subpages automatically from non-www to www url?

Hi Lars,

If you setup the preferred domain from the beginning then the other host names never appear in google search or in links anywhere and never get indexed so there is not a need to redirect every possible page because there is no path where these links will occur or be followed. So for example there are no links anywhere for http://mojoportal.com/documentation.aspx. Yes if someone types that in manually then they will be redirected to www.mojoportal.com, but that would be a very rare thing to happen and the user would then see that the www is needed and would see the main menu for documentation. This situation has 0 impact on google or SEO.

If you already have a problem where different host names have been used in various links and have been indexed by google so that traffic is already coming to your pages with variations in the host name, then you could probably solve it using the IIS Url Rewriter module.

Hope it helps,

Joe

8/27/2010 12:59:26 PM
Gravatar
Total Posts 137
When enough isn't

Re: How to redirect subpages automatically from non-www to www url?

Hi again´Joe!

We love MojoPortal.

But we are having some severe indexing issues even though we have done a lot of SEO and even though it’s our general impression that MojoPortal is truly well constructed with a lot of SEO functionality. Every adviser we have talked with are telling us to ensure we don’t have both www and non-www pages. We understand the message and want now to redirect every subpage from non-www to the similar www subpage. But MojoPortal doesn’t give us that opportunity as discussed here earlier. We have also been advised both from you and others to take a look at the Url Rewrite module, but we don’t have the IIS 7 possibility with our webhotel. So we are kind of stucked.

I have earlier raised the issue that there is no redirect in MojoPortal from http://mysite.com/subpageX to http://www.mysite.com/subpageX or vice versa. Only possibility is to set MojoPortal to do a very simple redirect from any non-www-subpage to the toplevel www page. And that’s even worse, because the search engines think that all non-www subpages then look the same … equal to the toplevel www page.

Have we either misunderstood the MojoPortal functionalities or are you considering to deal with this issue in the future. It’s really a pain for us and a very general issue for anyone having a CMS system.

Please don’t take this as any criticism – we are extremely happy with MojoPortal and truly impressed with the functionality. It’s just … you know … from good people you always expect even more .

Best regards
Lars
 

www.nysport.dk
www.boostadventure.dk
 

8/27/2010 1:22:09 PM
Gravatar
Total Posts 18439

Re: How to redirect subpages automatically from non-www to www url?

Hi Lars,

As I said in July, this problem is solved,

If you setup the preferred domain from the beginning then the other host names never appear in google search

http://www.mojoportal.com/forcing-a-preferred-host-name.aspx

If you force the preferred host name at the beginning when you launch a site then you will never have a problem, the problem only occurs after users have bookmarked your pages with the incorrect host name or if google already indexed it with an incorrect host name then it is possible someone will land on the non www link from google or a previous bookmark

If you set the www hostname as preferred and only submit the www site map to google you will have no problems. The problem only arises if you let users use more than one host name, if you force it to use just one from the beginning you avoid problems.

If users type in a different url in the browser and it redirects it has no effect on google. What you need to avoid is having any links anywhere that use the incorrect urls so they never get crawled by google. Forcing the preferred host name in the beginning solves it as long as you don't manually create incorrect links in your content.

If you didn't lock it down in the beginning and you already have a bunch of incorrect links in content that google crawled it becomes very difficult to solve without something like url re-writer to create permanent 301 redirects

I have never had any problems with mojoportal.com vs www.mojoportal.com because I've been forcing it to use www.mojoportal.com for a very long time.

Hope it helps,

Joe

8/27/2010 4:23:49 PM
Gravatar
Total Posts 18439

Re: How to redirect subpages automatically from non-www to www url?

Hi Lars,

After work today I got to chewing on this problem and the more I thought about it I realized I can make a better solution for this easily. The problem now is that it redirects to the root when enforcing the preferred host, I can easily make it redirect to the preferred host with the rest of the url as it was. I could even add a config setting to make it possible to use 301 instead of 302 for these redirects. I will do this for the next release. Sometimes its difficult to give the best answer to questions because my mind is already full of other problems I'm working on, but then when I chew on it later after stepping away from work I see it more clearly.

Best,

Joe

8/27/2010 4:33:45 PM
Gravatar
Total Posts 137
When enough isn't

Re: How to redirect subpages automatically from non-www to www url?

Hi Joe!

That would be awesome smileyyes.

Really cool you can see the problem ... and that it's even possible for next coming release. We will cross our fingers for your work on the release.

Thanks, thanks, thanks

Lars

8/28/2010 12:48:23 PM
Gravatar
Total Posts 18439

Re: How to redirect subpages automatically from non-www to www url?

This is now implemented in the source code repository for those producing their own builds from source code. It will be in the next release for everyone else.

Best,

Joe

8/29/2010 2:26:46 AM
Gravatar
Total Posts 137
When enough isn't

Re: How to redirect subpages automatically from non-www to www url?

Fantastic, Joe!

We are ready to download as soon as the release is out there smiley.

Thanks, Lars

www.nysport.dk
www.boostadventure.dk

You must sign in to post in the forums. This thread is closed to new posts.