Can I contribute to the translation of the plugin?

Can I contribute to the translation of the plugin?

The short answer; yes, you can.

The longer version:

Yoast SEO free

You can help translate our free Yoast SEO plugin by going to WordPress.org. There you can see how many strings are already translated in your language. You can click your language to start contributing. You can also use the WordPress.org translation handbook as a guideline.

Premium plugins

After 10 years of translating on translate.yoast.com, we』ve decided to move the translations for all our Premium plugins to TranslationsPress. This service allows us to use language packs for our premium plugins, and it helps you translate faster because it offers Translation Memory. Of course, we hope you』ll keep translating our Yoast plugins.

To sign up for an account, please go to translationspress.com/app/yoast. Once you』ve created your account, you』ll automatically be added to Team Yoast where you can translate all our premium plugins. Once you』re logged in, you』ll be able to add your translations. Once they』re approved, we will include them in an upcoming version of the plugin.

How to change to search label for the store locator

How to change to search label for the store locator

The store locator』s first field, by default, is labelled with: Enter your postal code, city and / or state 

As of version 7.5 of Yoast SEO: Local, this label can be customized using the developer filter: yoast-local-seo-search-label.

add_filter( 'yoast-local-seo-search-label', function( $search_label ) {
$search_label = 'Your new search label';

return $search_label;
} );

Template files for Local SEO

Template files for Local SEO

If you』re using Local SEO with multiple locations, you get a new custom post type. It』s called 「Locations」 in the admin, but under the hood it』s called wpseo_locations. This post type creates two types of pages: a custom post type archive page and single location pages.

Because of how the WordPress template hierarchy works, in a 「default」 theme, the custom post type archive would use the file archive.php, and the single location file would use single.php. This is, in many cases, not ideal. So it』s a good thing you can override that behavior!

Want to learn all about local SEO? In our Local SEO training, you』ll learn how to optimize the website of your local business for search engines. So you』ll start ranking in your area! Check out our Local SEO training.

The Custom Post Type Archive

To have your theme not use the archive.php file, you can create a file called archive-wpseo_locations.php. This file will need to be entered into your theme directory.

You could use this page, for instance, to show a map of all your locations. All your locations are expected to be shown at the /locations url.

You can find a good example of what such a page should look like in this gist, based on the WordPress TwentyTwelve theme:

The single location page

In the same way as you can create archive-wpseo_locations.php, you can also create single-wpseo_locations.php. The easiest fix here is often to just copy the page.php template into this file, that removes most of the comment stuff etc that single.php normally holds.

How do I import redirects using Yoast SEO Premium?

How do I import redirects using Yoast SEO Premium?

Import from a Supported Redirect PluginImport from a CSV FileFrequently Asked Questions About Importing from CSV FileImport From the .htaccess File

Where is the Redirect Import Feature?

Yoast SEO Premium includes the option to import your redirects from popular redirect plugins, from a .CSV file, or from an .htaccess file. Log in to your WordPress website. When you』re logged in, you will be in your 『Dashboard』. Click on 『SEO』 On the left-hand side, you will see a menu. In that menu, click on 『SEO』. Click on 『Tools』 The 『SEO』 settings will expand providing you additional options. Click on 『Tools』. Click on 『Import and Export』.  Select the 『Import redirects』 tab.  Choose an import method. Yoast SEO Premium allows you to import from supported redirect plugins, from a CSV file, or from an .htaccess file.

Import from a Supported Redirect Plugin

The first option is to import from the following plugins:

RedirectionSafe Redirect ManagerSimple 301 Redirects

Note: With Redirection Yoast is expected to import Groups and any Regular Expressions (either as part of a group or not).

Import from a CSV File

The second option is to import from a custom CSV file. This method requires that the syntax and format is correct.

First line must be: Origin,Target,Type,Format or "Origin","Target","Type","Format"File must use a comma separatorFile must contain only one redirect entry per lineFile must use UTF-8 encodingFile must use Unix line endingsThe target URL cell for 410 and 451 redirects must be emptyFile must not contain a mixture of LTR and RTL characters

Download Example CSV File

Download an example .csv file here: Yoast SEO redirect example

Multisite

See our Frequently Asked Questions About Importing from CSV File for a specific concern about Multisites.

Plain Redirects

Examples of plain redirect entries in the CSV redirect import file:

"/three-zero-one","/",301,"plain"
"/three-zero-two","/",302,"plain"
"/three-zero-seven","/",307,"plain"
"/four-ten","",410,"plain"
"/four-five-one","",451,"plain"

RegEx Redirects

Only use REGEX Redirects if you know what you are doing!

If you are not sure what REGEXs Redirects are, learn more about them here.

Examples of RegEx redirect entries in the CSV redirect import file:

"^/([0-9]{4})/([0-9]{2})/(?!page/)(.+)$","/$4",301,"regex"
"^/([0-9]{2})/(?!page/)(.+)$","/$3",302,"regex"
"^/([0-9]{2})/(.+)$","/$2",307,"regex"
"^/([0-9]{4})/(?!page/)(.+)$","",410,"regex"
"^/([0-9]{3})/(?!page/)(.+)$","",451,"regex"

Frequently Asked Questions About Importing from CSV File

Can I add plain and RegEx redirects in the same file? Yes. The CSV file can contain a mix of RegEx and plain redirects. Can I use the CSV import to change existing redirects? No. Existing redirects are skipped during the import process. Please use the redirect manager to update existing redirects. Is the CSV file case sensitive? Yes. Especially the format column which must be in lowercase. Can I create or edit the CSV file in a spreadsheet program, like Excel or Google Docs? Yes. Most spreadsheet programs can convert a spreadsheet into a CSV file. However, the converted CSV file must use the required syntax and formats listed above. We recommend using a plain text editor to review the converted CSV file to ensure the file matches the requirements above. Why is my CSV file not importing? The most common cause for the CSV import to fail is the format of the file. Please download a fresh copy of the example file above and run the import again. If the example file works and your custom file does not, please check the format of the file in a text editor. If the custom file continues to fail, please contact support. Can I import a large CSV file? Yes. The import can handle a large CSV file. However, having too large of a CSV file may result in server time out issues. If you experience time out issues try breaking the file into smaller chunks and importing each one, one at a time.The other option is to increase your resources available in the PHP environment (max_execution_time) this will allow the import more time to complete. You may also want to increase the following PHP values to increase resources available to the import function: upload_max_filesize, post_max_size, and memory_limit. If you are not sure what that means or how to do that, your host provider can help. Do I have to use quotes in the file? No. It』s common practice to quote cells that are empty or contain text. However, it』s not required and the import will work with a mixture of quoted and unquoted cells. Can the origin URL contain the site URL? Yes, but it』s not recommended. The origin URL is relative to the site where you are importing the redirects. The import process will attempt to make the origin URL relative to the WordPress site URL. However, this can fail if the WordPress site URL is not an exact match to the URL in the import file. Therefore, we recommend that Origin URLs start with a / and not the domain. Can the target URL contain a full absolute URL? Yes. However, we recommend only using full absolute URLs when linking to other sites. For links to your own site, we recommend using relative URLs that begin with a /. Will this Work on a Multisite? Our developers are aware of an issue where importing redirects fail on a multisite. Till a fix is ready, please try this workaround: Multisites have a custom list of allowed filetypes. We use a CSV file type, which is not on the list. This can be fixed by adding csv to the Upload file types list at wp-admin/network/settings.php. If you are not sure how to do this, your host provider can help.

Import From the .htaccess File

The third option is to import by copying the contents of an .htaccess file and pasting them into the text box. You can do this by copying the .htaccess file on one site and then going to SEO-Tools-Import/Export-Import Redirects (it is a tab). Then pasting the file into the box.

Redirects must be in one of the following formats:

Plain Redirects

# Redirect [type of redirect, e.g. 301] [source] [target]
# In this example, if a user lands on /family/ (the source)
# they are redirected to /school/ (the target).
Redirect 301 /family/ /school/

RegEx Redirects

# RedirectMatch [type of redirect, e.g. 301] [source] [target]
# If you go to example.com/rain, you would be redirected to mydomain.com/sunny/
# However, the same goes for example.com/in-the-rain or example.com/draining.
# Both would be redirected to example.com/sunny/
RedirectMatch 301 /rain /sunny/

How to update your PHP version

How to update your PHP version

Before you update your PHP version, we advise you to read this article and check if your WordPress site is ready for PHP 7.

The single most important reason to update your PHP version is security. PHP versions 5.2 through to 7.0, while still actively in use on millions of sites, no longer get security updates. Another benefit of updating is the ridiculous increase in speed you get. Therefore, we recommend updating to PHP 7.1 or higher.

We always advise creating a backup of your website before making any major changes.

Most hosts have documentation explaining how you can update your PHP version yourself. In case you cannot do the update yourself, you can ask your hosting company for assistance. Below, we prepared a sample letter that you can use when contacting your host.

Hi,For security reasons and an increase in speed I want to update the PHP version of my WordPress website to PHP 7.1 or higher. WordPress also strongly recommends the latest version of PHP on their requirements page, https://wordpress.org/about/requirements/.More information about currently supported versions of PHP can be found here: http://php.net/supported-versions.php.I』ve heard that sometimes a website can break when updating the PHP version. Can you assist me and update my site safely to PHP 7.1 or higher?Thanks!

In this list, you can find the documentation on PHP 7 that our hosting partners provide.

HostDocumentationBluehostPHP version selectingCloudwaysPHP7 and its compatibilityDreamHostPHP 7 overviewGoDaddyView or change your PHP versionGreenGeeksWhat version of PHP does GreenGeek use?InMotionUsing multiple PHP versions on one accountInterServerChange PHP version in cPanelMediaTempleWhat』s new in PHP7PagelyChanging PHP versionsRAIDBOXESTechnical questionsRoseHostingRoseHosting supportSavviiChanging the PHP versionSiteGroundSwitch to a different PHP versionWP EnginePHP 7 FAQLiquidwebUpgrade Apache and PHP using cPanel

Do you work with or own a hosting company and you』d like to be listed here as well? You can go to our Yoast Hosting partnership page and fill in the form.

How to customize the sitemap index

How to customize the sitemap index

The Yoast SEO plugin generates a sitemap of your site. It is a crucial feature of the plugin and it helps search engines find and crawl your pages. The sitemap index includes links to a variety of sub-sitemaps for posts, pages, authors, categories, tags, and other taxonomies. In Yoast SEO, you can customize the sitemap index, and choose what you show in it. If you are not sure what needs to go in the sitemap, read this article first.

An impeccable site structure makes your content easy to find. Yoast SEO Premium contains several features that help you structure your site. By giving your website a structure boost, you get benefits for your SEO, your visitors, and search engines!

Available sitemaps

Content Types
Media and Images
Taxonomies
Archives
Other content

Related articles

Sitemap Feature
View Sitemaps
Limit the number of entries
Submit to Search Engines
Troubleshooting
Developer filters

Content types: Search appearance section

The sitemap index can be customized under SEO > Search Appearance. Posts, pages, and other custom post types can be customized under the 『Content Types』 tab. Removing a post type from the search results will also remove them from the sitemap. Showing them in the search results will show them in the sitemap. Add or remove items as needed. Log in to your WordPress website. When you』re logged in, you will be in your 『Dashboard』. Click on 『SEO』. On the left-hand side, you will see a menu. In that menu, click on 『SEO』. Click on 『Search Appearance』. The 『SEO』 settings will expand providing you additional options. Click on 『Search Appearance』. Click on the appropriate tab and toggle Show [type] in search results? to add or remove sitemaps. Yes: [type] will be set to index and a sitemap will be created.No: [type] will be set to noindex and a sitemap will not be created. Click 『Save Changes』.

Content types: Not publicly added

Some content types are not added publicly and thus do not appear for exclusion. When this occurs, the post type can either be made public or manually excluded using a developer filter.

Content types: Removing it individually from sitemap

You can also remove individual post types from the sitemap by marking them with a noindex tag. Use this guide if you are not sure how to do that: How do I Noindex Urls?

Media and images

When you upload an image, WordPress automatically creates a post of the type 「attachment」 in the database, and the corresponding URL for that. It calls this the 「media」 post type. Learn more here.

Taxonomies

Categories, tags, and other taxonomies can be customized under the 『Taxonomies』 tab. Some taxonomies are not added publicly and thus do not appear for exclusion. When this occurs, the taxonomy can either be made public or manually excluded using a developer filter.

Archives – author sitemap

Our plugin creates a sitemap that lists the author pages. Learn more about customizing the author sitemap for single author websites or multiple author websites.

Other sitemaps

Video sitemap

Our Video SEO plugin sitemap can be customized under Admin > SEO > Video SEO.

News sitemap

Our News SEO plugin sitemap can be customized under Admin > SEO > News SEO.

Local sitemap

Our Local SEO plugin sitemap is generated based on the location data entered into the plugin.

Non-Yoast plugin sitemaps

You can add non-Yoast sitemaps to the index. Please read this article for more information.

Below are a few examples using the developer filters in your functions.php file to customize the sitemaps. If you are not familiar with implementing code in WordPress, we highly recommend checking out Code Poet as they have a great list of available freelance WordPress developers. You may also wish to review a Yoast Partner.

Content types

Filter: wpseo_sitemap_exclude_post_type

/* Exclude One Content Type From Yoast SEO Sitemap */
function sitemap_exclude_post_type( $value, $post_type ) {
if ( $post_type == 'post_type_slug' ) return true;
}
add_filter( 'wpseo_sitemap_exclude_post_type', 'sitemap_exclude_post_type', 10, 2 );

/* Exclude Multiple Content Types From Yoast SEO Sitemap */
add_filter( 'wpseo_sitemap_exclude_post_type', 'sitemap_exclude_post_type', 10, 2 );
function sitemap_exclude_post_type( $value, $post_type ) {
$post_type_to_exclude = array('post_type_slug1','post_type_slug2', 'post_type_slug3');
if( in_array( $post_type, $post_type_to_exclude ) ) return true;
}

Taxonomies

Filter: wpseo_sitemap_exclude_taxonomy

/* Exclude One Taxonomy From Yoast SEO Sitemap */
function sitemap_exclude_taxonomy( $value, $taxonomy ) {
if ( $taxonomy == 'taxonomy_slug' ) return true;
}
add_filter( 'wpseo_sitemap_exclude_taxonomy', 'sitemap_exclude_taxonomy', 10, 2 );

/* Exclude Multiple Taxonomies From Yoast SEO Sitemap */
add_filter( 'wpseo_sitemap_exclude_taxonomy', 'sitemap_exclude_taxonomy', 10, 2 );
function sitemap_exclude_taxonomy( $value, $taxonomy ) {
$taxonomy_to_exclude = array('taxonomy_slug1','taxonomy_slug2', 'taxonomy_slug3');
if( in_array( $taxonomy, $taxonomy_to_exclude ) ) return true;
}

Authors

Filter: wpseo_sitemap_exclude_author

Entries per sitemap

You can change the number of entries per sitemap by using the filter below. The default number is 1000. Please refer to this code snippet as an example.

wpseo_sitemap_entries_per_page

Exclude posts and pages

To exclude posts and pages from the sitemap follow the instructions here

Exclude a term from the sitemap

Use the filter below:

wpseo_exclude_from_sitemap_by_term_ids

Add an external sitemap

To add an external sitemap follow the instructions here

Work with dynamic URLs

Please refer to this GitHub comment for how you may best integrate dynamic URLs.

Change post URLs for the sitemap

You can use this filter to change post URLs for the sitemap:

wpseo_xml_sitemap_post_url

How to fix the missing Schema property: no global identifier provided (e.g. gtin mpn isbn)

How to fix the missing Schema property: no global identifier provided (e.g. gtin mpn isbn)

If you are here, you probably got the Google Search Console warning: 「No global identifier provided (e.g. gtin mpn isbn)」. In this article, we』ll explain what Global identifiers are, and how you can fix the missing property issue with WooCommerce SEO!

What are Unique Product Identifiers?

Unique Product Identifiers (UPI) are codes that identify a product. You have probably seen a lot of them in your life, encoded in a barcode. However, if you have a website, you need to distinguish between the different types of UPIs, and learn how to use them. 

The most common product identifiers are GTINs and MPN. In addition, if you use WooCommerce with Yoast SEO you will also see the following identifiers:

GTIN8 – a code used for items that are too small to fit the usual 12-14 digits. GTIN12 / UPC  and GTIN13 / EAN – the most common codes, used in North America (UPC) and outside of North America  (EAN). GTIN14 / ITF-14: a code used for packaged products that contain multiple individual items such as a pack of canned sodas. ISBN: stands for 「International Standard Book Number」 and it is used, of course, for books. MPN: stands for Manufacturer part number. These numbers are typically found on machines and hardware that contain different parts. 

Why do you need to add global identifiers?

If your product contains product identifiers, Google will be able to recognize them and distinguish them from other products. That will increase your chances to rank with that product and get it displayed as a rich result. So, adding these numbers can positively affect your rankings and impact the visibility of your products in the search results 

How to fix the missing schema property: no global identifier provided (e.g. gtin mpn isbn)

You can fix the no global identifier provided (e.g., GTIN, MPN, ISBN) warning in Google Search Console by adding the relevant data to the products on your site. That』s easy to do if you use WooCommerce SEO with Yoast SEO. WooCommerce SEO automatically adds the appropriate schema properties based on the data you add to the products. To add the global identifiers and fix the issue, follow these steps. Select the product you want to add the global identifiers to from the Products overview screen. One you are in the Product editing screen, scroll down to the WooCommerce metabox. The meta box show the options in the first, General tab by default. Click on the Yoast SEO tab to open it. You will see the product identifier settings. Add the appropriate unique identifier for the product you are editing. There is one key thing you will have to get right – make sure the numbers you submit are accurate. Note that, for GTINs, that means that you should provide the correct number for the product and all its variants. So, if you sell dresses in different sizes, you need to add the GTIN for each of the dresses. Google has special (and strict) guidelines on how you should submit GTINs. Make sure to read and follow those guidelines closely. It is good practice to submit both GTIN numbers and MPN numbers. Of course, that is if your product contains them. Providing both numbers will give Google more information about the product, which may result in a better presentation in the search results. Just like with GTIN numbers, Google has strict guidelines for MPN numbers. Read the guidelines carefully and make sure to apply them correctly. Failing to comply with the guidelines may lead to Google disapproving your product.  Once you have filled in all the details, click Update at the top of the Product editing screen. Your changes will be saved and WooCommerce SEO will automatically add the missing schema properties to the product.

Google update on enforcement of Unique Product Identifiers

In 2019, Google also announced an update on its enforcement of Unique Product Identifiers. According to this update, Google will not disapprove your product if it doesn』t contain UPIs. However, it will lower its chances to rank high in the search results. More importantly, Google allows you to set an attribute to your products when a UPI does not exist. However, this is only for products that really do not contain UPIs. If a product does have a UPI, but you deliberately set its attribute to 「false,」 your product will be disapproved. In addition, if you use the same GTIN for multiple products, Google will disapprove of those too. 

In conclusion, when submitting your UPIs, there are two things you need to be very mindful of: accuracy and truthfulness. WooCommerce SEO will take care of the rest!

Use the WooCommerce SEO plugin to solve these issues

Get best practice technical SEO for ecommerce, automatically! And make your products stand out in the search results.
Get WooCommerce SEO »Only $69 USD / per year (ex VAT) for 1 site – incl. 1 year free updates and support

Do I need to disable PHP redirects?

Do I need to disable PHP redirects?

The short answer for most users is:
No. You do not need to disable PHP redirects.

Please let us explain.

The default setting for Yoast SEO Premium is that PHP handles your redirects. This requires no work on your end, except for entering the redirects. If you only have few redirects your server will be able to handle them quickly using PHP redirections.

However, if you have a lot of redirects (exact number depends on your server), they may slow PHP down. In that case it can be useful to let your webserver take care of the redirects.

When you go to Admin -> SEO -> Redirects -> Settings you』ll see a toggle to select the type of redirect method you want to use. The default recommend option is 『PHP』 but you can change to .htaccess (Apache) or 『Web server』 (NGINX). Log in to your WordPress website. When you』re logged in, you will be in your 『Dashboard』. Click on 『SEO』. On the left-hand side, you will see a menu. In that menu, click on 『SEO』. Click on 『Redirects』. The 『SEO』 settings will expand providing you additional options. Click on 『Redirects』. Click on the 『Settings』 tab. Select the redirect method of your choice. PHP: This is the default option and works with most server configuration..htaccess: This option writes directly to your server. On some Apache servers, your webhost may recommend writing directly to this file. Optionally, you can write to a separate .htaccess file.Web Server: This option primarily appears for non-Apache servers like NGINX. Click 『Save Changes』.

In some cases, you will receive a notification regarding changes that need to be applied to your server to use the selection redirect method. Please make the requested changes to ensure redirects are handled correctly.

Can I watch this video in my own language?

Can I watch this video in my own language?

Did you know that YouTube can auto-translate our English subtitles? It』s not perfect, but it could be helpful for sure. Just follow the step below to auto-translate YouTube videos on desktop. Click the video and then pause it. You are now able to see the settings icon in the bottom right corner. Click the Settings icon. Click 『Subtitles/CC』 in the menu. Click the option 『Auto-translate』. Scroll down the list and select the language you prefer.

Google News doesn』t show recently published articles

Google News doesn』t show recently published articles

Google News articles are time sensitive and crawled more often than other parts of your site. Websites must submit a request to be included and be accepted before articles appear in Google News.

If you have not submitted your website, please follow the steps here.

If you have submitted your website, please use the URL inspection tool by following the steps here.