URL Length

Importance: Unknown

Type: N/A

Having a URL that is long could potentially hurt that web page’s rankings.

Example:

http://yourdomain.com/going-downtown-Toronto-for-organic-green-apples

The above link could be rewritten as:

http://yourdomain.com/organic-green-apples-toronto

HTML Markup Validation

Importance: Low

Type: Quality

Having a website that is valid HTML can increase your website’s rankings, as it shows a quality website (properly coded website).

Test your website’s HTML W3C validation: http://validator.w3.org/

Domain Registration Length

Importance: Low

Type: Trust

Google’s US patent US7346839 B2, “Information retrieval based on historical data,” states that Google may use the length of the domain name registration to distinguish between illegitimate and legitimate domains.

Certain signals may be used to distinguish between illegitimate and legitimate domains. For example, domains can be renewed up to a period of 10 years. Valuable (legitimate) domains are often paid for several years in advance, while doorway (illegitimate) domains rarely are used for more than a year. Therefore, the date when a domain expires in the future can be used as a factor in predicting the legitimacy of a domain and, thus, the documents associated therewith.

Reference: http://www.google.com/patents/US7346839

How-to Create Clean Search Links in WordPress

When you or a visitor performs a search on a WordPress site, the search result link looks like this: http://www.yourdomain.com/?s=Search+Powered

Where “Search Powered” is what your or the visitor was searching for. However, that doesn’t look pretty and if you use permalinks, it does not match the permalink structure, so why not make the search link pretty?

This is what the pretty search link will look like, using “Search Powered” as the search word:

Home

To create clean search links using a function or plugin, you’ll need to have permalinks enabled. You can check Settings > Permalinks to see if you have enabled pretty permalinks.

Create a Function

To make a pretty search link, use the following code snippet by adding it to your theme’s functions.php file:

// Clean search permalinks /?s= to /search/ 
function clean_search_link() { global $wp_rewrite; if ( !isset( $wp_rewrite ) || !is_object( $wp_rewrite ) || !$wp_rewrite->using_permalinks() ) return; $search_base = $wp_rewrite->search_base; if ( is_search() && !is_admin() && strpos( $_SERVER['REQUEST_URI'], "/{$search_base}/" ) === false ) { wp_redirect( home_url( "/{$search_base}/" . urlencode( get_query_var( 's' ) ) ) ); exit(); } } add_action( 'template_redirect', 'clean_search_link' );

We are creating a function called cleansearchlink that uses wp_rewrite, which is a WordPress class used for rewrite rules.

That’s it, just add the function to your theme’s functions.php file. There is no need to modify the searchform.php file or any other file.

Use the Plugin

There is a plugin, which the function version is based on, that can do this for you, called Better WP Search; just install and activate.

Unlike the function version, there is no need to touch the theme’s functions.php file (or any other file).