Multilingual sites

What do I need when contacting WordPress.com VIP? Multilingual sites can widely vary in both display needs and content-entry needs, so when contacting WordPress.com VIP about your multilingual site, it can be helpful to share the following information:

  1. Where will the original content be authored, created, edited, and deleted? Will this be in the WordPress.com VIP environment, or will it be elsewhere and then imported in?
  2. Where will the language specific theme files be authored, created, edited, and deleted? How will this content be brought into the VIP environment and managed?
  3. What is the desired UX for editors in switching between various languages?
  4. What is the desired UX for viewers in selecting a language for the site? Will this be automated or manual? Can they only switch between landing pages, or will they be able to toggle an article in different languages?

The more details you can provide about how you expect your multilingual site to work, the better our recommendations can be.

Can I set up a multilingual site on WordPress.com VIP?

Yes, absolutely. For multilingual sites we typically recommend setting up separate sites — in previous experience we’ve learned that this is the least complicated way of handling multilingual content, and typically over time the different language sites need different things and end up diverging anyway.

Just to clarify, when you set up separate wp.com instances for each language, you can set them up under different subdomains, but not different subdirectories. For example, you will be able to set up french.yourdomain.com and italian.yourdomain.com, but you will not be able to set up yourdomain.com/fr and yourdomain.com/it. 

How do a set a blog/admin’s language?

You can do that under Language Settings.

What multilingual plugins can we use on WordPress.com VIP?

We review multilingual plugins just like any other plugin. Please take a look at our plugin review guidelines here, and contact us if you have any questions.

Mapping Your Domain and Managing DNS

You love your shiny new WordPress.com site and you probably want to put your own domain on it.

To proceed forward, you’ll need to have first registered your domain with a domain registrar. If you haven’t yet, you can register your domain through WordPress.com or another domain registrar. To map a domain you already own, simply follow these instructions. Domain mappings are included for free on WordPress.com VIP.

Since DNS propagation can take up to 72 hours, you will want to begin this process at least a week before your planned launch date.

Managing DNS Records

Once you point your domain to WordPress nameservers, you can continue to manage your domain with our Domain Management tools which allow you to add custom DNS records.

If you map a 2nd-level domain (e.g. example.com), you can easily add a subdomain (e.g. vip.example.com) to it.

There are a few kinds of DNS changes that you cannot make directly through our tools, but that can be requested by contacting us via a ticket:

  • Adding wildcard DNS records
  • Adding TXT records that exceed 192 characters in length
  • Changing TTL values for DNS records
  • Adding TXT records for subdomains
  • Managing NS records for a domain

Mapping to WordPress.com

If your site will live on a 2nd-level domain (example.com), we highly recommend hosting it with our DNS servers. In order to smoothly handle any volume of traffic and weather any malicious attack, our load balancing and high availability solutions are dependent on us being the name server for 2nd-level domains. By taking this approach, it enables our skilled systems team to effectively route traffic to additional servers, mitigate attacks, or accommodate for an outage in one of our data centers.

If you have an existing website that you are migrating to WordPress.com, the following steps should be taken to set up the domain least a week before the launch:

  1. Send us the ZONE file for your domain including any subdomains or MX records for email.
  2. We will set up the domain mapping on the WordPress.com site
  3. We will set up the DNS entries to mirror your current setup (so your existing site continues to work when you point your domain to our nameservers).
  4. Once setup is complete, you can verify and switch to our nameservers.
  5. When your site is ready to launch, we will update your website’s entry to point to your new WordPress.com site.

This provides the most fluid migration and means we’re around to pull the actual trigger and assist with any post-launch tasks.

Using WordPress.com Nameservers

The nameservers to use are:

ns1.wordpress.com
ns2.wordpress.com
ns3.wordpress.com

We provide a handy DNS management tool for you to create A, MX, CNAME, and TXT records.

Using 3rd-party Nameservers

If you’re required to host the DNS elsewhere, you can create A records pointing to two or more of our IPs. To get this information, please contact us using the contact form inside your Dashboard.

At least a couple of days before the migration you will want to change the TTL to 300, or if that is not allowed by your current DNS hosting, the lowest value allowed to allow for the smoothest transition possible.

Subdomain (sub.example.com)

If your site will live on a subdomain (sub.example.com, all that is required is a CNAME. When the site is ready to launch, you can create a CNAME entry pointing to your registered WordPress.com site:

sub.example.com IN CNAME subexample.wordpress.com.

Note that you will want to change the TTL for the subdomain to 300 or the next lowest value allowed to make the transition as smooth as possible.

Primary Domains

Every WordPress.com site can have multiple mapped domains but only one Primary Domain. This the canonical domain name for your site and all other domains registered against the site will redirect accordingly. The Primary Domain can be set from the Domains page in the WordPress.com Dashboard; just head to Settings > Domains and select the domain you would like to be primary.

www subdomain

WordPress.com does not support using the www subdomain as a primary hostname for a site. The www subdomain is typically set up as a CNAME to the root domain, and requests to it are then redirected to the root domain.

Subdirectories

WordPress.com does not support hosting the root of a site in the subdirectory of a site’s primary domain.

DNSSEC

WordPress.com DNS does not currently support DNSSEC. If managing your DNS on WordPress.com you’ll need to disable DNSSEC at your registrar.

Change Your Pretty Permalinks or Add Custom Rewrite Rules

Permalinks are the permanent URLs to posts, categories, and other sections of your website. They generally look like this by default:

https://vip.wordpress.com/2012/09/04/new-liveblog-add-on/
https://vip.wordpress.com/category/plugins/
https://vip.wordpress.com/tag/liveblog/

URLs should be permanent and never change — hence the name permalink. When you’re first configuring your site though, you can modify them from the default structure. Some of the values you can use include:

%year% The year of the post, four digits, for example 2004
%monthnum% Month of the year, for example 05
%day% Day of the month, for example 28
%hour% Hour of the day, for example 15
%minute% Minute of the hour, for example 43
%second% Second of the minute, for example 33
%post_id% The unique ID # of the post, for example 423
%postname% A sanitized version of the title of the post (post slug field on Edit Post/Page panel). So “This Is A Great Post!” becomes this-is-a-great-post in the URI.
%category% A sanitized version of the category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI.

VIP

For WordPress.com VIP clients, if you’d like to customize these permastructs, you can use any of the following helper functions in your theme’s functions.php file:

/**
 * Enable a custom permastruct, if the site wants to use one that's not the WP.com default (/yyyy/mm/dd/post-name/)
 */
wpcom_vip_load_permastruct( '/%category%/%postname%/' );

/**
 * Enables a custom or no category base, if the site wants to use one that's not the WP.com default (/category/)
 */
wpcom_vip_load_category_base( 'section' );

/**
 * Enables a custom or no tag base, if the site wants to use one that's not the WP.com default (/tag/)
 */
wpcom_vip_load_tag_base( 'topic' );

If you need to test this in a local environment, instead use the wp rewrite structure command from WP CLI.

Your theme’s rewrite rules are flushed automatically on every deploy (and when you switch themes), so you only need to worry about committing this change to the repository.

Custom rewrite rules can also be committed to your theme and incorporated in this manner.

There is no need to ever call flush_rewrite_rules() on WordPress VIP.

Rewrite Rules Inspector

rewriterules

A handy tool for testing and debugging your permastructs is the rewrite rules inspector. Enabled by default on WordPress.com VIP, this plugin features a complete list of your rules and a URL-matching tool to test your URLs. To find the inspector, visit VIP -> rewrite rules.

Note: if the inspector ever shows all or some of your rules in red and issues the “some rules are missing” error, click the flush rules button, and your rules should fully refresh.

 

home_url() vs site_url()

When working with domain-mapped sites on WordPress.com, home_url() and site_url() will return different values.

  • home_url() returns the primary mapped domain (e.g. vippuppies.com)
  • site_url() returns the *.wordpress.com URL (e.g. vippuppies.wordpress.com)

A few notes:

  • home_url() will only return the mapped domain on or after the init has fired. Calling it before then will return the .wordpress.com domain.
  • If you accidentally use site_url() in your templates, theme-side links will still redirect correctly to the home_url() equivalent.
  • home_url() is the preferred method, as it avoids the above redirect.

Ready to get started?

Tell us about your needs

Let us lead the way. We’ll help you select a top tier development partner. We’ll train your developers, operations, infrastructure, and editorial teams. We’ll coarchitect your deployment processes. We will provide live support for peak events. We’ll help your people avoid dark alleys and blind corners, and reduce wasted cycles.