- 1). Log in to WordPress as the "admin" user to display the Dashboard.
- 2). Click "Editor" under "Appearance" to edit the PHP files in the current theme.
- 3). Click "Header" on the right-hand side of the page under "Templates" to edit the "header.php" file.
- 4). Locate the first line that begins with "<link." Insert a new line above that line.
- 5). Enter the canonical tag for your homepage. For example, type:
<link rel="canonical" href="/links/?u=http://www.example.com/index.php" /> - 6). Click "Update File" at the bottom of the screen to save the changes.