The Ultimate Guide to On-Site SEO: Part 2

The Ultimate Guide to On-Site SEO: Part 2

Written by: dapa Posted on: 23rd January 2017 Share this post:

The Ultimate Guide to On-Site SEO: Part 2

Assuming you have come here from part 1 of the on-site SEO guide you should have a basic onsite-seo setup on your website including features such as:

  • Optimised meta titles
  • Optimised ALT text
  • Optimised meta descriptions
  • Keeping your landing pages a click away from the homepage

Although these are the core basics of onsite SEO, they are also some of the most effective features.

For this part of the guide you will need access to FTP, CMS access if you have one and access to back up the site including files and the database.

The reason for this is that some .htaccess files will be made which could affect the site negatively so carefully follow instructions on this guide to ensure there is no down time on the site.

Tidy up your URL’s

Keeping your URL’s tidy gives you quite a healthy benefit for SEO, and will increase your click through rate.
Would you rather click on a link on google that looks like this:
https://wearedapa.co.uk/uhwir/blog-post-4-23-11-2017

Or

https://wearedapa.co.uk/ultimate-guide-onsite-seo-part-2

Google also reads it the same way humans do, if we were targeting the keyword “ultimate guide for onsite SEO” we would make the url “ultimate-guide-onsite-seo-part-2” as it is part 2 of the guide.

The reason there is no “stop words” is because they will break up the keyword we are targeting and extend the URL length which is recommended to be below 100 characters and a maximum of 3-5 words.

If you are changing existing URL’s you will have to redirect the old URL to the new URL, the reason for this is to ensure the link juice keeps passing on, and helps avoid 404 errors.

You can easily redirect these URL’s by adding this code to the main .htaccess file located at the root of the site underneath :RewriteEngine On

RedirectMatch 301 ^/contact\.php$ /contact-us.php

For example the code above will redirect http://yourdomain.com/contact.php to http://yourdomain.com/contact-us.php

Make sure you test the URLs after the redirect is setup to ensure everything is working as it should be.

Lowering your Domain URL length (optional)

Making your site non www will be beneficial as it would lower your URL length and give you 4 more characters to get into your URLs, you may think it sounds trivial going through all of this work to get just 4 more characters but if you have a lot of blogposts or products on your website and can’t find the time to work through them all changing and redirecting urls the 4 extra characters could give all of your products or posts a boost in SEO if a crucial part of the URL is cropped out by google.

To do this go to: https://www.google.com/webmasters/

  1. Click sign in at the top right
  2. If there are no property’s shown follow the steps if your website is shown skip to step 7
  3. Click on add a property at the top right of the screen
  4. Type in your domain name into the form shown on the screen and submit it
  5. Select alternate methods at the top of the screen
  6. Select “HTML Tag” and copy the meta displayed on the screen then paste it into the <head> of your website before the closing </head> tag then click verify on webmaster tools it should take you to the website property, click on the google logo on the top left of the screen.
  7. From the home screen of webmaster tools click on the property of the website you are working on.
  8. Click on the cog icon located at the top right of the page then select site settings from the dropdown menu.
  9. Set preferred domain without the www.

This will tell google to display your website without the www.

It is also beneficial to then redirect www to non www so try to access your site with the following structures replacing yourdomain.com with your domain name:

http://yourdomain.com

And

http://www.yourdomain.com

pay attention to which url you entered and if it has redirected or not, if www. Redirects to non www you can skip these steps:

  1. Open up your .htaccess file located at the root of the website.
  2. Add the following code to the bottom of the .htaccess file:
RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]

RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
  1. Save the file and test your site on yourdomain.com

if it redirects you have successfully earned yourself 4 extra characters for your URL’s
Check for homepage duplicates

Removing duplicate homepages will help your homepage rank for the targeted keywords as google will be seeing your home page as a duplicate. Go to your website homepage by entering the URL directly into the top of the browser for example : http://yourdomain.com

And test all of these homepage variants as a page url on the site but replace “yourdomain.com” with your domain:

http://yourdomain.com/home.php

http://yourdomain.com/index.php

http://yourdomain.com/main.php

http://yourdomain.com/home.html

http://yourdomain.com/index.html

http://yourdomain.com/main.html

If some of these display the homepage but the url doesn’t change to “http://yourdomain.com” you will have to redirect them by adding this code underneath RewriteEngine On  inside the .htaccess file:

RedirectMatch 301 ^/index\.php$ /

The code above will redirect index.php to your base domain.
Check for indexed URL parameters

URL parameters can cause some serious SEO errors site-wide, these are mainly a problem with ecommerce websites.

URL parameters are methods of using PHP data to effect different aspects of your site, to identify a URL parameter you will have to go to google and enter site:yourdomain.com this will bring up all indexed pages for your url you will then have to scan through all results looking for something like this in the url ?sort=ASC
To take action on this you will have to go into your robots.txt file located at the root of the site and add this code underneathUser-agent: *

Disallow: *?sort

This will stop google seeing all of your pages as duplicates.
Check if your user pages are noindex

Indexable shopping cart pages, login pages, my account pages and checkout pages will expose your site to hackers as it may give people an insight into your sites layout or even give them access to order authorisation codes this can easily be fixed by adding the following code to the main robots.txt file located at the site root underneathUser-agent: *

Disallow: /yourcartpage
Disallow: /yourloginpage
Disallow: /yourmyaccountpage
Disallow: /yourcheckoutpage

You will have to change the urls afterDisallow: /to the relevant pages.

1 thought on “The Ultimate Guide to On-Site SEO: Part 2”

  1. This is a fantastic guide to SEO! I’m so glad I found your site as I can get the SEO on my site to be really good and I can make sure to be seen everywhere on the web!

Leave a Reply

Your email address will not be published.