Title: code for 301 redirect
Last modified: August 21, 2016

---

# code for 301 redirect

 *  [mrsroynie](https://wordpress.org/support/users/mrsroynie/)
 * (@mrsroynie)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/code-for-301-redirect/)
 * I wonder if anyone can help me. I have used Adventure Journal as the basis for
   an old business website, which was temporarily hosted on a subdomain of another(
   completely unrelated) business website, giving it a rather clunky URL. I recently
   bought a new domain name and built a duplicate site. The old site has quite a
   decent Google ranking, which I don’t want to lose, so I thought I would do a 
   301 redirect, nominating the identical pages on the new site as canonical. I 
   thought I would be able to simply download a plug-in and have that do the dirty
   work for me. However, it appears that the original site was built using some 
   sort of cut-down version of WordPress with the result that the folders on the
   server are read-only. So I can neither update WordPress, nor access the full 
   library of plug-ins.
 * The html code for the redirect is easy to understand,
 * ‘<link href=”[http://www.example.com/canonical-version-of-page/&#8221](http://www.example.com/canonical-version-of-page/&#8221);
   rel=”canonical” />’
 * Since I can’t alter the code for the (4) individual pages, could I simply enter
   4 html link tags into the header.php file? Would the search engines pick it up
   or do I need to write a snazzy bit of php to automatically insert the URLs for
   the individual pages into the redirect code?

The topic ‘code for 301 redirect’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/adventure-journal/1.7.2/screenshot.
   png)
 * Adventure Journal
 * [Support Threads](https://wordpress.org/support/theme/adventure-journal/)
 * [Active Topics](https://wordpress.org/support/theme/adventure-journal/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/adventure-journal/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/adventure-journal/reviews/)

## Tags

 * [301 redirect](https://wordpress.org/support/topic-tag/301-redirect/)
 * [duplicate](https://wordpress.org/support/topic-tag/duplicate/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * 0 replies
 * 1 participant
 * Last reply from: [mrsroynie](https://wordpress.org/support/users/mrsroynie/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/code-for-301-redirect/)
 * Status: not resolved