Problems, need help? Have a tip or advice? Post it here.
10 posts Page 1 of 1
Hello,
My SEO friend explained that your blog posts rank better when you remove the word 'blog' from your url. For instance if my blog post is:
http://mysite.com/blog/category-name/post-title

The post will have better SEO weight if the word 'blog' is removed to read:
http://mysite.com/category-name/post-title

That's because your category-name is now at the 2nd level rather than 3rd. And your post-title is now at 3rd level rather than 4th. Is there anyway to keep the word 'blog' for blog_list.html - but eliminate 'blog' from all posts?

Below is my current CouchCMS code. Hoping there is a way to alter it to work in this way.

Thank you!
Amber
-------------------------------------

#blog.php
RewriteRule ^blog$ "$0/" [R=301,L,QSA]
RewriteRule ^blog/$ blog.php [L,QSA]
RewriteRule ^blog/.*?([^\.\/]*)\.html$ blog.php?pname=$1 [L,QSA]
RewriteRule ^blog/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ blog.php?d=$1$2$3 [L,QSA]
RewriteRule ^blog/[^\.]*?([^/\.]*)/$ blog.php?fname=$1 [L,QSA]
RewriteRule ^blog/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
Amber,

Currently the only way right now to remove a template's name ('blog' in your case) from the URL is to use 'index.php' as the template.

So, if instead of blog.php, you were to use index.php as the blog template, your URL would become -
http://mysite.com/category-name/post-title
i.e. no 'index' in there and so you get the kind of URL you desire.
Hi KK, thank you for the quick reply. This makes sense. Luckily I only have around 20 blog posts so far. If I make the switch will the old blog post links/urls automatically correct themselves?

Also, is it true that if switched to .index my site will no longer have a url like so: http://mysite.com/blog for blog_list.html, correct?

Thanks!
Amber
If I make the switch will the old blog post links/urls automatically correct themselves?
If you haven't hard-coded the links then all links will reflect the new template automatically.
That is to say, if you have used (as you should) 'k_page_link' and <cms:link /> for the URLs, everything will work just fine.

is it true that if switched to .index my site will no longer have a url like so: http://mysite.com/blog for blog_list.html, correct?
'blog_list.html' is an embedded file - its name has no bearing on the URL. Only the main templates (i.e. those that appear in admin-panel sidebar) affect the URLs.

Hope that answers your queries.
I guess what I meant to say is that on my list of blog posts (generated by blog_list.html and usually seen on :
mysite.com/blog

If switched to index.html
will now be available simply at:

mysite.com/

Is this correct?

I think it must be but just want to make sure because it would be nice if it was also available on:
mysite.com/blog

While still allowing individual posts to be like so (because of index.html)
mystie.com/post-title

Ohhh maybe I can do both if I create a 'blog' page with and generate the list view there...? As well as on index.html?

Sorry, confused.
Hello,
I have switched my list of blog posts to the home page but am a bit confused because the tutorial is made for using 'blog.php'. It is working so fine so far, with 'blog_list.php' showing up on index.php. But when clicking on a post it still takes me to: http://mysite.com/blog/post-title.

How do I change this behavior to remove 'blog' like so: http://mysite.com/post-title ?

So far the top of my index.php page looks like this:

<?php require_once('couch/cms.php'); ?>
<cms:template title='Home Page' clonable='0' />
<cms:editable name='blog_content' type='richtext' />
<cms:editable name='blog_image'
crop='1'
width='900'
height='300'
type='image'
/>

Thank you!
Amber
Amber,

I suppose you still have the 'blog.php' template in place and the 'blog_list.php' contains something like this -
Code: Select all
<cms:pages masterpage='blog.php' >

If so, please change the 'masterpage' to point to 'index.php'.

Does this help?
Great, that worked, thank you!
Hi Amber,

thanks for sharing the advice on not using 'blog' in the url. I saw it too late I'm afraid :?

I'm in the process of setting up my first blog and just bought a domain from here which contains 'blog' as part of the second level domain. So the domain I registered has the format "www.name-blog.com". In that case having 'blog' as part of the domain name shouldn't affect the rankings of the site, right?

I'm covering a niche topic with my blog, so I don't want to get penalized just for using 'blog' as part of the domain name. But that shouldn't be a factor in the second level domain right?

Thanks in advance & regards
Katie
@katie
If you read the initial post again, you'll notice it explains the issue is that the category and post title get bumped down a level.
That's because your category-name is now at the 2nd level rather than 3rd. And your post-title is now at 3rd level rather than 4th.

It's not the word "blog" that's the problem. The problem is that it displaces the meaningful part of the URL.

So, no. "Blog" in your domain name would not create this issue.
10 posts Page 1 of 1