Joomla - Wrong url path from google results - url

I have a strange problem in one Joomla website.
If i access from homepage and then navigate into the site it works correct, but if i go in some internal page from google results it shows uncorrect page layout, because the url is not correct.
This is the correct url
Correct page from homepage
and this the uncorrect url that Google finds Uncorrect page from Google
in this second page is showed rating module (that i never used) instead of an article, as you can see in links.
Someone can help me?
EDIT: I'm using Joomla 2.5 version. Every menu item is category blog type, and must show all articles of one category. Each category have 2 articles. In the uncorrect link seems that it access to single article, adding the rating that i have hidden in each article

Which version are you using?
if you can turn on SEF option in the global settings in joomla admin. Then you need to make sure all your articles are in menus. then if you link them on different pages it should keep the url the same.
The way you have it at the moment with all the x=123&... get params pages will show for what ever ids you change the menu to.

The reason you are seeing an uncorrect layout is the two different Itemid parameters (the right url has 127 while the wrong one has 104). The rest of the difference in the urls will be ignored by Joomla.
Solution: Find your menu item with id 104 (look at the menu ids on the right of the menu items view), then check which modules appear on the page from there. There may be modules in non-visible positions.
One of these modules is publishing the links with the wrong ids. If it's a Joomla core (like a search module) you can usually force the Itemid either in the module or in the component's configuration. Else you need to fixsome third party code.
Only once you have solved the multiple-itemid should you turn on SEF, otherwise you'd get the same problem only more difficult to trace.
sh404 could help you with this, I'd give it a try on a test site to see if it gets you out of trouble faster.

Related

Opencart: Remove page ID path from URL

I'm trying to make my site more SEO friendly and I' noticing that whenever I go to an product through either a tag or a different page (2,3,4 ect) that it adds it to the URL.
For example:
www.wisdomsurvival.com/Guardian-Survival-kit/culinary-can-of-preparedness-seeds.html?page=2
I would like to remove ?page=2 from the path
Opencart 1.5.4
Any help would be greatly appreciated.
EDIT: My main goal is to have one URL for each page instead of multiple paths. For example:
http://www.wisdomsurvival.com/person-guardian-preparedness-package-camping-bug-out
http://www.wisdomsurvival.com/camping-and-bug-out/person-guardian-preparedness-package-camping-bug-out
The first URL is a direct link, the second comes from clicking from a category, the third (not shown because I can only post 2 links) comes from clicking from a subcategory and the fourth (also not shown) from a manufacturer list.
I need to have them all either redirect to the first URL or just go directly to the first URL without redirecting, along with any other URLS such as the ones that have the page ID path or tag path.
I recognise that theme :-)
Where is the ?page=2 coming from as the link works perfectly without it. You need to trace the source of the link. First try the template views and see if it is a simple link edit in the layout that will accomplish what you need.
If not you may find the information is coded in the controller if it is being dynamically generated. Again you should be able to edit the code that generates the link there.
If not you may find that it is in a model that is being called. Again, just find the model and edit the link structure you find there.
The url on your page will only be a reflection of the url you generated somewhere else in order for the link to be followed in the first place.
Usually when I am building with opencart I find the theme modules are often not coded very well in terms of SEO. Fortunately with opencart these things are usually very easy to remedy.
Top trick -> I often stick additional bits into my urls that have no impact on the page generated but Google picks up on as keywords anyway.
If you post your code if you are having problems reformatting the link formats I will have a look for you,
Hope that helps,
Paul.

Remove multiple indexed URLs (duplicates) with redirect

I am managing a website that has only about 20-50 pages (articles, links and etc.). Somehow, Google indexed over 1000 links (duplicates, same page with different string in the URL). I found that those links contain ?date= in url. I already blocked by writing Disallow: *date* in robots.txt, made an XML map (which I did not had before) placed it into root folder and imported to Google Webmaster Tools. But the problem still stays: links are (and probably will be) in search results. I would easily remove URLs in GWT, but they can only remove one link at the time, and removing >1000 one by one is not an option.
The question: Is it possible to make dynamic 301 redirects from every page that contains $date= in url to the original one, and how? I am thinking that Google will re-index those pages, redirect to original ones, and delete those numerous pages from search results.
Example:
bad page: www.website.com/article?date=1961-11-1 and n same pages with different "date"
good page: www.website.com/article
automatically redirect all bad pages to good ones.
I have spent whole work day trying to solve this problem, would be nice to get some support. Thank you!
P.S. As far as I think this coding question is the right one to ask in stackoverflow, but if I am wrong (forgive me) redirect me to right place where I can ask this one.
You're looking for the canonical link element, that's the way Google suggests to solve this problem (here's the Webmasters help page about it), and it's used by most if not all search engines. When you place an element like
<link rel='canonical' href='http://www.website.com/article'>
in the header of the page, the URI in the href attribute will be considered the 'canonical' version of the page, the one to be indexed and so on.
For the record: if the duplicate content is not a html page (say, it's a dynamically generated image), and supposing you're using Apache, you can use .htaccess to redirect to the canonical version. Unfortunately the Redirect and RedirectMatch directives don't handle query strings (they're strictly for URIs), but you could use mod_rewrite to strip parts of the query string. See, for example, this answer for a way to do it.

Opencart Breadcrumb link inconsistencies

I am having similar problem in my other pages and it’s driving me crazy. I have modified a “manufacturer” module to “series”
as well as the link too.
For example, I was able to change this link:
bishounenboutique.com/manufacturer
to this:
bishounenboutique.com/series
Click on the breadcrumbs, and
the they are fine in that page. However,
if you click on top image “Psycho pass” for example in that link, it will redirect to:
bishounenboutique.com/index.php?route=product/manufacturer/product&manufacturer_id=13
(which is not what i want. Ideally I want the link to be bishounenboutique.com/psycho-pass)
But set that aside, on that page if you click on the breadcrumb link “series”, it gives:
bishounenboutique.com/index.php?route=series
but it is supposed to be:
bishounenboutique.com/series
!!!
Can anyone please give me an idea of why this is happening?
I have already enabled SEO url and renamed the htaccess file. But I don't know why it works on some links but not others.
Thank you.
Products, Manufacturers, Information Pages and Categories all have SEO keyword fields, which you can find in their DATA tabs (except for Manufacturers which is in the GENERAL tab). These need to be set for all of the above to make them work. The reason the second link you've shown doesn't work is because it's product/manufacturer/product not just product/manufacturer
EDIT
product/manufacturer/product is actually a manufacturer link - it's just poorly named by OpenCart. OpenCart still knows it is a manufacturer link and you can see that by the id that's passed along with it (manufacturer_id not product_id)
Also, OC isn't meant to rewrite it's standard URL's, only product, category, manufacturer (individual manufacturer pages not the list of manufacturers) and info pages. This works on all versions that I'm aware of so if it's not with yours, the vQmod is likely at fault and you'll need to get the developer of that to fix it
I've written a route editor mod myself that doesn't require going in and hacking up a vQmod to get it to work so I understand the complications with it

Using Page Anchors In Primary Site Navigation

So I have a basic (Wordpress powered) portfolio site where most of the content lives on the homepage, and then I'm using a custom posts category for the featured projects, so users can click through and get more info on the project at its category-single.php page. So the idea is it's a pretty flat site in terms of structure.
So flat, in fact, that the site navigation in the header simply links to content that is all on the home page (About, Work, What, Contact are all sections on the home page that get scrolled down to when you click).
What I want to happen is when the user is on the home page, and clicks one of the top nav links, the page scrolls down to that section (no problem here - I've got this part working just fine), and then when the user is on another page of the site (think one level deep, a custom post page) if they click the header nav links it returns them to the homepage and scrolls them down to that section. I'm thinking in terms of basic url anchor structure, like http://somesite.com/page#specific_section where that link takes the user to a specific section on somesite.com/page.
However the trouble I seem to be having is with creating these url's correctly. I've written them as mysite.com#about, mysite.com#work, mysite.com#contact, mysite.com#page-top, but instead of trigging the user to go to the homepage, the browser is interpreting those links as instructions to look for those sections on the current page.
What am I doing wrong, and what is the correct way to accomplish this?
The thing I'm trying to consider additionally, is whether I need to create PHP logic that displays the links one way on the homepage, and another way on the rest of the site.
What you need to do is use the actual filenames of the pages in question, like:
mysite.com/aboutme.html#qualifications
`mysite.com/portfolio.html#ZirTech
For links to the homepage, try either using the root relative path or fully qualifying the link like so:
http://www.mysite.com/#section fully qualified
/#section relative path
You shouldn't need to implement them a different way on the homepage - just implement them properly throughout the site.
When you write the URLs as mysite.com#work, mysite.com#contact, mysite.com#page-top the browser looks for the page in question, because it is not instructed to go to another page (you need to add "/" to redirect it).
If you want them to point to the main page, set them as
mysite.com/index.php#work, mysite.com/index.php#contact, mysite.com/index.php#page-top
Maybe it is possible without index.php, but I'm a bit lazy to test now:
mysite.com/#work, mysite.com/#contact, mysite.com/#page-top

DotNetNuke URL's After Menu Change

I am not particularly familiar with DotNetNuke, so please correct me if I am using any wrong terminology.
I have a client who has a bunch of links that are hardcoded in an HTML module. The URL's looks like the following:
http://www.siteurl.org/level1/level2/level3/level4/pageName.aspx
So the URL for the page is basically made from how the menu is constructed. When I change any order in the menu, this breaks the hardcoded links. Is there a way to use something like an ID instead for the URL so no matter what my menu looks like, the page will be resolved properly?
You could use an ID for the pages, linking to
http://www.siteurl.org/default.aspx?tabid=## where ## is the ID for each page.
Now the key will be to find the proper IDs which you could do by looking at the HTML source of the Admin/Pages page.
That being said, the proper thing to do, would be to not MOVE or RENAME pages, this breaks all the old URLS (as you're experiencing) as well as those pages/urls in any search indexes.
A better way, though more work, would be to create a new page at the new PATH (where you move things to) and then redirect the old page to the new page (in the page settings). This requires quite a bit of work, but is the best way currently to handle old URLs, I have a video example of this at http://www.dotnetnuke.com/Resources/Video-Library/Viewer/VideoId/213/Renaming-A-Page-In-DotNetNuke-.aspx

Resources