Redirect a single page

Redirect an entire site

This way does it with links intact. That is www.oldsite.com/some/crazy/link.html will become www.newsite.com/some/crazy/link.html. This is extremely helpful when you are just "moving" a site to a new domain. Place this on the OLD site:

This is exactly what I am trying to do, but am grappling with the example here. I have pages like /contact.html and they need to go to /contact-us as in your example as well as a host of other pages where the file name was changed slightly or in some cases no longer exists.

Can you provide an example of the code you used? Many thanks for any help

My company has just redeveloped our website. It is going all wordpress. However the initial site was in standard html and css. and we had a blog on a sub domain running wordpress.

The problem now is we have deleted the sub domain for the blog as we are totally switching away from it. Some of its pages are listed in google. How would we redirect from blog.website.com to http://www.website.com using htaccess if no folder or sub domain now exists. Is this even possible?

Yes you would use Redirect 301 /oldpage/ http://example.com/newpage/ as I need to do exactly the same thing on a site I’m converting to WordPress. It is precisely because the old url doesn’t work that you tell the search engines what the new url is to replace it. Did you manage to get this working?

The issue for me is the amount of time it is going to take to redirect every single old page to the new page as the old site structure was different, sigh..

The question sometimes arrises with clients “How permanent is a 301 permanent redirect?” Anotherwords, if at some future point, the client changes their mind for whatever reason, what are the consequences of changing a “permanent” redirect?

Well i am transfering all of my data from old site to new one. including posts. i.e. i want to on site A there was a page called /mypage.html and i want that when user click on this url from search page it will be redirect to new site containing same page. I tried to do a 301 redirect using ” But its redirecting only main domain, please help me how can i redirect posts too? Regards

Redirects are great in terms of SEO and specifically 301 as opposed to 302. That said, you need to refrain from using redirects whenever possible because they don’t really retain all your Google juice. Just be sure to use it as last resort rather than a primal one. Again, I’m talking specifically about the search engine optimization aspect of the matter.

This is a must if you’re moving pages and don’t want to have a bunch of dead links. I use SEO spider to map all URLs on old website and then create 301 redirection for the one that don’t match anymore.

i have a query regarding redirection.
i have site A and right now i redirected to Site B 301 permanent redirection.
Now in site A i have a folder called “test” but that should not get redirect to Site B…
how to stop avoiding from site A/particular folder to site B…
we don have that folder in Site B so i am getting not found error.
and i don want that folder url should not get redirect.. how to over come from this prob…
Need help …………

If you’re keeping your same domain name and moving from a HTML site to a WP site, we’re manually coding in the 301’s. But, we have a WP blog on this HTML site that we added about a year ago, so the URL structure is domain.com/blog/title-of-article-here/ and we’re getting ready to remove the /blog directory since we don’t need it as the new website will be 100% WordPress. For this redirect sequence, we’re going to use the Simple 301 Redirects plugin which will now point domain.com/blog/title-of-article-here/ to domain.com/title-of-article-here/ to shorten the URL and make it a more focused URL for Google to see and have more of the article titles display in the SERPs. This is why we’re loving WordPress sites! – Patrick

I have an Ubuntu 12.04 box running 3 sites. One of them I need to force to use http://www.site.com vs just site.com. I have mod_rewrite is running and I have placed a .htaccess file in my /var/www/site directory with this code in it and restarted apache. Nothing, no effect. I even change the redirect to point at google just trying to see if it was working at all. Nothing. Any suggestions, do I have it in the wrong directory.. etc..

I use the 301 redirect to remove “www” from the domain name. I noticed that css-tricks also have your “www” removed. I wonder if that have an effect on page popularity (link history) for older web pages with “www”.

Hi there, hope that someone knows what I’m doing wrong:
I have an old site (www.tehnomarket.com) that I would like to redirect to a new one (www.tehnomarket.com/novi), but when I try to do it like this it just goes into an infinite loop:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.tehnomarket.com$ [OR]
RewriteCond %{HTTP_HOST} ^tehnomarket.com$
RewriteRule ^(.*)$ http://www.tehnomarket.com/novi/index.php/$1 [R=301,L]
Thx :)

I’m redesigning an old website entirely with WordPress. Urls will obviously be different. The current website has very good ranking in Google, will the method mentioned above keep the good ranking and seo the website currently has?

Sorry if i am out i have thousands error 400 by changing the name of the redirect php file i have. problem is all error links does not exsist in my domain.
Never had these links. Any way how can i redirect 301 with some lines all of them to my site, they all start with the same link, example:
redirect.php?url=http://www.acidicredhosting.space/acenet-web-hosting-allytech-cloud-web-hosting
redirect.php?url=http://www.acidicredhosting.space/fast-web-hosting-uk-cheap-web-host-providers

Posting Code!

You may write comments in Markdown. This makes code easy to post, as you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences (```) with double new lines before and after.

Code of Conduct

Absolutely anyone is welcome to submit a comment here. But not all comments will be posted. Think of it like writing a letter to the editor. All submitted comments will be read, but not all published. Published comments will be on-topic, helpful, and further the discussion or debate.

Want to tell us something privately?

Feel free to use our contact form. That's a great place to let us know about typos or anything off-topic.