If I have a website like:
google.com/index.html?c=123123&p=shoes
Will it be better for SEO to have it as:
google.com/index.html?code=123123&footwear=shoes
I mean, does giving useful names to query string parameters help SEO?
Yes query string could help Google to understand the meaning of the page.
What is important with query string that you display unique content when changing the value of a parameter.
Example:
google.com/index.html?code=123123&footwear=shoes
google.com/index.html?code=123123&footwear=shoesB
If in this case you display the same content you can occur in duplicated issues.
(You can also use canonical URL)
The best would be re-write the the string as URL friendly like
google.com/footwear/shoes/name-product-ID
A unique URL for each product.
Here some useful resource of duplicate issue
http://www.seomoz.org/learn-seo/duplicate-content
Hope can help
Related
I'm searching against a table of news articles. The 2 relevant columns are ArticleTitle and ArticleText. When I want to search an article for a particular term, i started out with
column LIKE '%term%'.
However that gave me a lot of articles with the term inside anchor links, for example <a href="example.com/*term*> which would potentially return an irrelevant article.
So then I switched to
column LIKE '% term %'.
The problem with this query is it didn't find articles who's title or text began/ended with the term. Also it didn't match against things like term- or term's, which I do want.
It seems like the query i want should be able to do something like this
'%[^a-z]term[^a-z]%
This should exclude terms within anchor links, but everything else. I think this query still excludes strings that begin/end with the term. Is there a better solution? Does SQL-Server's FULL TEXT INDEXING solve this problem?
Additionally, would it be a good idea to store ArticleTitle and ArticleText as HTML-free columns? Then i could use '%term%' without getting anchor links. These would be 2 extra columns though, because eventually i will need the original HTML for formatting purposes.
Thanks.
SQL Server's LIKE allows you to define Regex-like patterns like you described.
A better option is to use fulltext search:
WHERE CONTAINS(ArticleTitle, 'term')
exploits the index properly (the LIKE '%term%' query is slow), and provides other benefit in the search algorithm.
Additionally, you might benefit from storing a plaintext version of the article alongside the HTML version, and run your search queries on it.
SQL is not designed to interpret HTML strings. As such, you'd only be able to postpone the problem till a more difficult issue arrives (for example, a comment node that contains your search terms as part of a plain sentence).
You can still utilize FULL TEXT as a prefilter and then run an HTML analysis on the application layer to further filter your result set.
We have data in our graph that is indexed by Lucene and need to query it with a
Field Grouping
The example in the link above shows the Lucene syntax to be:
title:(+return +"pink panther")
I can't figure out how to send a request like that via http to the REST interface. Specifically, the space in the second term is causing me problems.
Our data is actually a list and I need to match on multiple items:
regions:(+asia +"north america")
Anyone have any ideas?
Update: For the record, the following url encoded string works for this particular query:
regions%3A%28%2Basia+%2B%22north+america%22%29
Isn't it enough to just URL encode the query using java.net.URLEncoder or something?
What drawbacks can you think of if I design my REST API with query strings without parameter values? Like so:
http://host/path/to/page?edit
http://host/path/to/page?delete
http://host/path/to/page/+commentId?reply
Instead of e.g.:
http://host/api/edit?page=path/to/page
http://host/api/delete?page=path/to/page
http://host/api/reply?page=path/to/page&comment=commentId
( Edit: Any page-X?edit and page-X?delete links would trigger GET requests but wouldn't actually edit or delete the page. Instead, they show a page with a <form>, in which page-X can be edited, or a <form> with a Really delete page-X? confiramtion dialog. The actual edit/delete requests would be POST or DELETE requests. In the same manner as host/api/edit?page=path/to/page shows a page with an edit <form>. /Edit. )
Pleace note that ?action is not how query strings are usually formatted. Instead, they are usually formated like so: ?key=value;key2=v2;key3=v3
Moreover, sometimes I'd use URLs like this one:
http://host/path/to/page?delete;user=spammer
That is, I'd include a query string parameter with no value (delete) and one parameter with a value (user=spammer) (in order to delete all comments posted by the spammer)
My Web framework copes fine with query strings like ?reply. So I suppose that what I'm mostly wondering about, is can you think of any client side issues? Or any problems, should I decide to use another Web framework? (Do you know if the frameworks you use provides information on query strings without parameter values?)
(My understanding from reading http://labs.apache.org/webarch/uri/rfc/rfc3986.html is that the query string format I use is just fine, but what does that matter to all clients and server frameworks everywhere.)
(I currently use the Lift-Web framework. I've tested Play Framework too and it was possible to get hold of the value-less query strings parameters, so both Play and Lift-Web seems okay from my point of view.)
Here is a related question about query strings with no values. However, it deals with ASP.NET functions returning null in some cases: Access Query string parameters with no values in ASP.NET
Kind regards, Kaj-Magnus
Query parameters without value are no problem, but putting actions into the URI, in particular destructive ones, is.
Are you seriously thinking about "restful" design, and having a GET be a destructive action?
I want to use numeric IDs in a web application I am developing... However, as the ID is visible to users as a URL, I want to filter out profanity. Things like (I'll leave it to you to figure out what they are):
page.php?id=455
page.php?id=8008135
page.php?id=69
Has anyone solved this? Is this even a real problem?
Does it make sense just to skip numbers in my database sequence?
See also: How can I filter out profanity in base36 IDs?.
How about you using GUIDs? That would encode the actual numbers. I would bet most users don't even notice what is on the url.
I have about 7 query-string parameters in my URL :
http://www.examplesitname.com/EN/en/tshirt-jeans.aspx?productid=324175730&documentid=295110&producttitle=Pyjama+Tshirt&categoryid=55479572&source=TreeStructureNavigation&numberpage=1&pos=TG_n_n
If I break it down following are the query string parameters :
productid
documentid
producttitle
categoryid
source
numberpage
pos
Out of these I need to only display productId and documentId to the search engine, what is the best approach to achieve this?
I could accommodate one more query string parameter named "extendedattributes" which would contain a comma seperated list of remaining parameters which I could separate back in the request and create a response accordingly, but is that a good way to achieve this ? Is there any other better way ?
Thanks
Google Webmaster Tools will let you designate URL-string parameters to ignore or not ignore when they index your site. (Look under "Site Configuration" and then "Settings.") Doesn't help you with other crawlers, of course, so this is only a partial solution.
First thing that comes to my mind: # the rest of parameters as follows. And then use JavaScript/Ajax to retrieve rest of the parameter and load content accordingly. However, this method may require design changes as anything after # does not reach to the web server.
http://www.examplesitname.com/EN/en/tshirt-jeans.aspx?productid=324175730&documentid=295110#producttitle=Pyjama+Tshirt&categoryid=55479572&source=TreeStructureNavigation&numberpage=1&pos=TG_n_n
Use robots.txt or other techniques to remove all alternatives and add to a sitemap only the urls you need. Search engines will only index those you want.