0
votes

I am currently using the metatags module in Drupal 7 to set the canonical tags, however the canonical URL that it shows on the live page does not have a www. in it.

This is an issue because the I have set Drupal to rewrite the URLs so that they all have www. at the beginning of the URL

For example, the current canonical URL is http://example.com whereas I would like it to be http://www.example.com

Currently in the metatags module the pages are set to use [current-page:url:absolute] as the canonical.

1

1 Answers

0
votes

I have just figured it out. I changed the $base_url variable in /sites/default/settings.php to include the www. in the URL and this solved the issue.