wordpress rewrite and google SEO issue - php

I have a custom wordpress page that I wanted to make its url SEO friendly.
So I added some code using rewrite api to convert this url:
http://example.com/page1/?id=1234
to:
http://example.com/page2/1234
page1 is still there and first url still valid. page1 was not very descriptive so I though that since I'm rewriting the url I might as well rename the page too.
Everything on the website works fine, but when I recreated the sitmap xml file and resubmitted to google I was hoping google would forget the old url and start showing the new one. This was a few weeks ago and I'm still seeing old urls. Any idea how I can remove the old urls? Do I need to physically rename the page itself?
Please help.
Thanks

Since google has indexed old URLs, it will stay in their index unless you do something about it. There are two options you can handle.
If you want the old urls to coexist, you can do rel="canonical" on the old URL pages. Canonical will indicate that they are same pages with different urls.
Other option is doing 301 redirect. 301 indicates that the page has moved permanently and it helps search engines to carry over the SEO values of the old urls to the new ones. In due course search engines will index the new urls and old urls will go away. After a certain point in time, once you are sure that old URLs are not receiving any traffic, you can get rid of the redirect rule.

Related

404 page redirects and SEO

I hope this is OK to ask here. I am almost ready to upload a new theme to my blog. Which after some serious consideration and research in SEO I have decided to restructure some of the pages, their child pages and to remove some of the categories.
Unfortunately this will result in various 404 results which will be bad for my site.
What I want to do is this:
On the 404 page, before it loads get last parameter of url, so for example: example.com/parent/child-page-name/
Then perform a check in wordpress using get_page_by_title().
If the page exists get the page permalink then use php header location to send 301 redirect to the new page.
if not, display 404 page with search options etc..
Is this a good way to handle this? is 301 the correct redirect?
To answer your redirect question, yes the 301 redirect is the correct one to use as it passes on the link equity from the last page.
Rather than using PHP to automatically solve your 404 problem when the new blog is launched, I'd crawl your website first and manually redirect all the old links to the new ones. It's tedious, but it will make sure nothing slips through the cracks that an automated process may otherwise miss.
A good way to do this is to crawl your site as it is at the moment, put all the links into a spreadsheet and put the new urls into the next column. From there you can concatenate the urls into a rewrite rule for the .htaccess file.
To show you what I mean, I have set up a basic sheet you can use to help you out.
https://docs.google.com/spreadsheets/d/1htHq0oeATsfrFJpAxKg0_e5dJqSmJ_idrrH-tudkuq4/edit?usp=sharing
Source: Past experience, Commercial SEO Technician for 2 years

Changing URLs in WordPress from having month and year to not having them

At the moment I have a WordPress site which has some posts and the links for those look like this:
http://www.example.com/2015/09/some-post
I need to change those URL's to
http://www.example.com/some-post
which is easy enough but I want also to make the old links redirect to the new links automatically. Is there a way to do this with a plugin or in the .htaccess file or in some other way?
Yes, certainly you can do it either way. Via .htaccess redirect, or using a redirection plugin. Or you can use both at the same time.
However, assuming you are doing this for SEO purposes, and want to redirect previously linked URLs in order to pass any existing "link juice" to the new link, then you really should consider the plugin approach first.
The best feature of these plugins is the overall logging, mapping, and administration of your URL redirection plan. You will want to make sure all your old URLS are returning an HTTP 301 Moved Permanently response code, and not a 302 Moved Temporarily, or worse a 404. These plugins are great for this type of redirection task, and will quickly allow you to see if your old links are being redirected properly. Incorrect redirection of old links will result in loss of the link power/equity you may already have on those links.

How to delete broken/dead links in Joomla 1.5?

I'm working on an old project based on Joomla 1.5. Most of its code was written in core php but it does have SEO URLs. I'm required remove dead links (about 2000 URLs) from the site as it is lowering our organic reach.
When I opened each of them, they showed me the 404 Error page of the site. I couldn't figure out what was wrong with that. After all, that's why we have 404 pages, right? .. to display errors when a link is not found over our server, right?
I tried cleaning up Server's Cache and even purging expired cache after reading some tuts. Now that it doesn't seem to help, I'm not sure what to do! So, any helps?
Btw, site is at www.parentune.com
and an example dead link is: http://www.parentune.com/parenting-blog/category/Adoption/latest
You don't have something to remove as it doesn't exist in your site.
You have to create 301 redirects for old url to new to help search engine crawl your updated content.
A 301 redirect example is:
Redirect 301 /oldpage.html /newpage.html
Good Luck!
As I didn't have any new URLs to redirect those old URLs to, but had the list of those reported URLs in an excel file, so what I did is I read the Excel file in an array and matched if $_SERVER['REQUEST_URI'] was in that array (obviously, all the URLs in that array have to be relative to index page). If the URL was found in the array, I simply redirected the page to homepage.
I also cross checked then on brokenlinkcheck.com and then it didn't report those URLs again as 404 URLs. So, seems like the approach fitted as solution! :D

maintain SEO of a website on platform change?

i have a site url
http://www.dualfocusphotography.co.uk
i want to convert it to word-press in such a way its SEO or site ranking should not be disturbed.
any one guide me is it possible if yes then how?
any help or relevant-materiel would be appreciated.
The main SEO issue when you try to move your site into wordpress is with the old indexed URLs by Google.
You must set "301 moved permanently status" to all of your old main urls.
You have to set an effective 404 page for error pages (WP had one).
Check for the main keywords through which people reached your site & retain those keywords. Generate new site map & submit in Google webmaster.
Migrate as quick as possible.
After migrating use WP SEO plugin & use keyword sparingly.
Use SEO friendly permalink structure.
Use twitter & facebook plugin's for socializing with virtual world.
Some useful links
https://seogadget.co.uk/surviving-seo-site-migration/
http://www.techwyse.com/blog/search-engine-optimization/5-tips-for-effective-seo-site-migration/
To keep your rankings, you should define what pages are the most important(have backlinks and are most visited and make sure you set redirects 301 on them.
There is a redirection plugin for wordpress to check for broken links. Doing redirect for all pages can affect the performance, that's why it is better to redirect the most important ones. This way you'll retain your rankings, however, a certain drop is unavoidable.
As long as you keep the same URLs, it won't matter if you are using from-scratch HTML pages or Wordpress. If you want to change the content around and will have new URLs, you'll need to do 301 redirects from each old page to each new page.
For example, the old page might have been oldsite.com/services.html, you'll do a 301 redirect to newsite.com/location/services
the 301 redirects are done in the .htaccess file.
I just wrote an article on how to SEO your wordpress site that might help you as well
Let me know if you need any help.
When migrating to a new CMS, try to keep your domain unchanged. If that's not possible, you should set up 301 permanent redirect to the following pages: homepage, most popular pages that get lots of traffic (check your analytics for them), pages with backlinks.
Also, when you change the URL structure, try to include your keywords
into the address
Check your robots.txt file - whether it;s indexing correctly
Generate the new xml sitemap and submit it via google webmaster
tools.
WordPress has it's own powerfll plugins for SEO. I suggest you use those.

Migrating an existing PHP site to use URL re-writing (Pretty URL's)

I currently have a community site that I run that is made up of 15 or so php pages. It is not currently very dynamic, only using php for includes/templates.
Currently no content is generated via a query string. The pages do not follow a standard naming convention and there are many inbound links.
I am looking to expand the site (and start using query strings to build pages) but before I do this I want to change over to use pretty url’s. With this in mind I have a few questions though.
1) Is it best to point all requests to a url rewriting page catch any request to .php pages first and pass them through to keep existing links then a giant case statement for each of the 15 pages finally the rewrite the url's of new pages as these will follow a set format?
2) How can I prevent duplicates in google after I have updated my sitemap.xml or will it remove the old pages?
Thanks
1) I'd redirect using apache's URL rewrite, and leave that static. It'll avoid the mess of having those 15 files you already have in your site.
I hope I have not misunderstood your question and this helps.
2) Edit robots.txt in the root of your website to tell google (and most others) what it should index, and what it shouldn't:
Google's info on the subject: http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=40360
Wikipedia: http://en.wikipedia.org/wiki/Robots_exclusion_standard
More info: http://www.robotstxt.org/
You should use a 301 permanent redirect from the old pages to the new URLs. This will redirect users that follow links from the old to the new and Google will pass the PageRank you have accumulated on the old pages to the new one. You might also look at using Googles new canonical tag on the old pages to ensure they transfer authority to the new page.
http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
In .htaccess, you want a bunch of
redirect 301 /old/old.htm http://www.you.com/new.htm
Regardless how its implemented, make sure any redirects use HTTP status 301, not the default (in may systems) of 302.
302 = Moved
301 = Moved permanently.
Using 301 helps google replace the old with the new URL, and should help pagerank etc carry over as well.

Categories