![]() |
Site Anchors - Friendly URL's - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Site Anchors - Friendly URL's (/showthread.php?tid=4468) Pages:
1
2
|
Site Anchors - Friendly URL's - El Forum - 11-27-2007 [eluser]syntax error[/eluser] Hi There I would like to enquire as to what the best approach for site urls should be. I'm about to launch a new site and so I would like to decide on my urls first, to avoid being penalized by the SE's. I use site_url() for all paths, so changing the url's would not be a problem. Currently I have them set without a trailing slash. EG: www.mysite.com/news/this-is-a-news-post I was wondering, for SEO purposes, if it would be better including the traling slash, as SE's would see a difference between www.mysite.com/news/this-is-a-news-post and www.mysite.com/news/this-is-a-news-post/ An abvious solution to this would be to use an extension, but then this would mess up my image paths. Any advice greatly appreciated. ![]() Rich Site Anchors - Friendly URL's - El Forum - 11-27-2007 [eluser]xwero[/eluser] you could route all urls with a trailing slash to a 404 error page Code: $route['/$'] = 'error/404'; Site Anchors - Friendly URL's - El Forum - 11-27-2007 [eluser]syntax error[/eluser] Thankss for your reply xwero, can you explain what you mean by adding an "e suffix"? I think I might actually use urls that end with a trailing slash, as this is the same method as expression engine, so i assume this is best. I would like to not use the trailing slash, as this would be the cleanest IMO, but I do fear problems might arise without using one. Site Anchors - Friendly URL's - El Forum - 11-27-2007 [eluser]xwero[/eluser] in the config.php file you have an option to add a suffix to your url. Sorry the previous answer wasn't clear. www.mysite.com/news/this-is-a-news-post.html Site Anchors - Friendly URL's - El Forum - 11-27-2007 [eluser]syntax error[/eluser] Yes I have tried that, thing is, I use site_url() for my image paths, and using site_url() with a suffix, it would also add the suffix to image paths. Conclusively, I should not be using site_url() for image paths, but it's too late now in my application. I should have used base_url(). Site Anchors - Friendly URL's - El Forum - 11-27-2007 [eluser]Michael Wales[/eluser] It amazes me how people believe companies like Google, Yahoo, and Microsoft can make billions of dollars a year, manage clusters of thousands of servers, running multiple instances of spiders that collect data on millions of pages and store that information on thousands of servers, in which another couple thousand bots turn that raw data into the data we search and store it in even more databases. Yet, they simply can not understand that domain.com/news/this-is-a-news-post/ and domain.com/news/this-is-a-new-post are the same thing. Get real people... your URL is the easiest thing in regards to SEO, you really don't have to worry about the nitpicky things like this. These companies are smart enough to figure things like this out for you - dynamically. Hell, you can even place a Sitemap on there to help them out even more. If you're worried about SEO - hire someone to write your copy that focuses on keyword density and internal linking. That is the secret to SEO - ask any blogger that's made more than 14 cents a day w/ advertising. Site Anchors - Friendly URL's - El Forum - 11-27-2007 [eluser]syntax error[/eluser] Who are you talking to, the entire web community? "you really don’t have to worry about the nitpicky things like this" - but I do, because I understand that if there is a link to: domain.com/news/this-is-a-news-post/ and also a link to domain.com/news/this-is-a-new-post, that SE's might treat them as 2 different pages, and therefore penalize me for duplicate content, this I am unsure, hence my post. I understand SE friendly URL's are but a small part of SEO, I would just like to know best approach. Site Anchors - Friendly URL's - El Forum - 11-27-2007 [eluser]Michael Wales[/eluser] Quote:because I understand that if there is a link to: domain.com/news/this-is-a-news-post/ and also a link to domain.com/news/this-is-a-new-post, that SE’s might treat them as 2 different pages, and therefore penalize me for duplicate content, this I am unsure, hence my post. And what I am telling you is they won't. Google: Every link indexed ends with a trailing slash, although I have received numerous inbounds without the slash. Yahoo: Same story MSN: One more 'gin! That domain has a PR4 with or without the www. or the trailing slash. Site Anchors - Friendly URL's - El Forum - 11-27-2007 [eluser]syntax error[/eluser] I did some googling, which i should have done first. Ahem, take a look at this: http://www.ragepank.com/articles/68/that-trailing-slash-does-matter/ and this: http://www.seroundtable.com/archives/001327.html Site Anchors - Friendly URL's - El Forum - 11-27-2007 [eluser]Michael Wales[/eluser] I checked the PageRank of those sites listed in both articles (good articles by the way). In the first article both URLs have a PageRank of 4. In the second article, both URLs have a PageRank of 0 (it must not exist anymore). I'm still of the belief these are old-school SEO beliefs that have not died as the technology these spiders use has grown (especially since that second article is from 2004). Nonetheless, and to get back to your question, I am of the mindset that the trailing slash should always be there. It's aesthetically pleasing, your web server expects it, and (who knows) it may keep search engines from seeing duplicate content. You could also go so far as to check substr($this->uri->uri_string(), -1) to see if it == '/'. If it does not, perform a 301 redirect to the trailing slash version (thus, limiting people from inbound linking to your non-trailing version). |