Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
My (rails 3.1) site currently does routing for objects using ids like so: /object/show/:id
For seo and url prettification, I'd like to change them to /object/show/:id/:title or something similar.
I still want to use ids to do the db lookup for performance and simplicity, so the addition of :title would be purely cosmetic.
Given this, would keeping the a tag hrefs on my site pointing to /object/show/:id and then doing a 301 permanent redirect to my new url scheme be an seo-friendly way of getting object titles into my urls? Are there any drawbacks to pointing my hrefs at the old scheme? Many are hardcoded to the original scheme, so we'd like to avoid the chore of inserting titles across the codebase if it's unnecessary. Thanks!
If you leave the hrefs to the old URLs then all the links will redirect.
This means all visitors will get a slightly slower experience and Google will leak some of the PageRank that gets passed between links.
Avoid it if possible.
Ryan Bates has a Screencast covering that subject when your change would only have to be cosmetic. Plus your hard coded links will still work.
Simply change the to_param method in your model.
def to_param
"#{id}-#{permalink}"
end
Model#find will still work that way.
Related
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
If I register a domain abc.com, but point via a redirect to another domain's subfolder like def.com/abc, what's the effect on SEO? Will Google index both abc.com and def.com/abc and display them for keyword "abc"?
Is there any way to avoid this or pomote abc.com so it displays more prominently than def.com/abc?
What's the best practice in this scenario?
Thanks for the help.
I'll refer to Google's official SEO guide. Here's a link to the full guide.
Provide one version of a URL to
reach a document
To prevent users from linking to one version of a URL and others linking to a different version (this
could split the reputation of that content between the URLs), focus on using and referring to one URL
in the structure and internal linking of your pages. If you do find that people are accessing the same
content through multiple URLs, setting up a 301 redirect from non-preferred URLs to the dominant
URL is a good solution for this. You may also use canonical URL or use the rel="canonical" link element
if you cannot redirect.
Since Google relies on links to your pages, you're going to have an issue if people link to one URL versus another. So in short, yes, that will probably have an effect on your optimization.
Edit: Google's algorithm may be smart enough to know your redirect and follow it when indexing your pages. Probably your best outcome will be to not do the redirect and instead point the domain at your content. The second best will be to use the HTTP 301 status code.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
We provide a link (example http://indiapriceinfo.in/getbeststore?mobile_id=76340 ) which redirects user to the online store which is selling it at best price (so the redirection link will lead you to different store on different days).
We use these kind of links on multiple domains with 302 redirection. But they all redirect using indiapriceinfo.in, like the above.
Is this bad for SEO? If it is then whats the best pratice to do it.
A 302 redirect is exactly what you should be doing since the redirects are temporary. The fact that the links all point to pages on the same domain is irrelvant as the links are judged on a per page basis, not per site. So indiapriceinfo.in won't gain anything as a domain SEO wise from these links.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm considering to use url pattern like below:
example.com/item/r6B0PmUmx07O/just-one-item
example.com/item/r6B0PGgwPJWl/yet-another-item
the part before slug is an unique and unpredictable id for an item.
compare with url like
example.com/item/1001/just-one-item
example.com/item/1002/yet-another-item
is this way bad for SEO?
or will it be bad for crawling by the search engine?(since the crawler cannot 'guess' the next item's id)
I'm not sure how many popular crawlers try to increment number values in URL to hit the page.
They generaly try to traverse by links.
But consider hiding some info from malicious users. If you can reach any info about your users (by example.com/user/1001) there is generally wrong idea to have sequential UID's. It's not mean to be a part of security but sometimes it's good to difficult access to your data. So the competition will have some difficulties when guessing how much products you have on stock :)
Consider supplying dynamical sitemap with links to all your products. This make you sure that every crawler will hit all your items no matter what key it has.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I've done some Googling trying to find out the origin of the word "slug" as used in URLs. However I can't seem to find any information on it. Does anyone know where this term came from?
http://en.wikipedia.org/wiki/Slug_(web_publishing)
This is what I've heard (from a somewhat reliable source):
Slugs are slow-moving gastropods. When you call someone a slug, you're calling them lazy - it's not a compliment. When you use human-readable terms in a URL instead of a database number or some other form, it's usually only for convenience; you can name URLs virtually anything you want, and so naming them using English words is mostly for readability. It supposedly originated when programmers became too "lazy" to look up a proper code or ID for a website, and began naming them using words. Those "lazy URLs" became slugs.
Again, I'm not sure if this is 100% correct, but it's what I've heard!
Hope this helps!
N.S.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have migrated a old php/mysql site to ruby on rails, and had to keep the old link structure - not to break incoming links.
The structure look like this:
domain.com/artists/user1/seo-friendly-name-of-painting1
domain.com/artists/user1/seo-friendly-name-of-painting2
domain.com/artists/user1/seo-friendly-name-of-painting3
etc.
I thinking about adding a blog to each user-profile. What would be the best structure for adding this new feature? I see two possibilities:
Add the blog as a new main item, and link to the user that owns it.
domain.com/blogs/seo-friendly-name-of-blog-title
Add the blog nested under the user:
domain.com/artists/user1/blogs/seo-friendly-name-of-blog-title
I am worried about mixing the paintings with with the blogs resource - they will be at the same level. Hope I explained it good enough.
I think both of them work.
With the second solution, you have to enter 2 params -> userid and blog-id/name
I prefer the first one, because you dont have to deal as much with uncorrect data when chaning the get params, like with the second solution. F.e.
domain.com/artists/wong user 123123/blogs/seo-friendly-name-of-blog-title
would produce another error message like
domain.com/artists/user1/blogs/wrong blog title
You can also design your URL schema as you like and then setup permanent redirections using mod_rewrite in Apache. While it may not be the most maintenable approach, I think it may be valuable if it helps you to come up with cleaner routes in your Rails app.
blogs.domain.com/user?...
edit:
if you want to change links structure you can redirect your current links like this