Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

301 Redirect Question

Featured Replies

I have set up a new wordpress website for a client on my server under a new domain name.

 

How do I point the old pages that exist under the old domain name to the new pages on the new domain name?

 

For example...how would I point:

 

www.oldsite.com/oldpage.html to www.newsite.co.uk/new-page/index.php

 

I know you can redirect /oldpage.html to www.newsite.co.uk/new-page/index.php but that's not what I need because /oldpage never existed on www.newsite.co.uk

 

Am I missing something?!

 

Thank you!! :D

Try adding

redirect 301 /oldpage.html www.newsite.co.uk/new-page/index.php

to the .htaccess file in the old domain (or creating a .htaccess file if it doesn't exist).

 

I don't think /oldpage.html has to exist in the new domain as you are just telling the old server that when someone types oldpage.html into a browser window it will get redirected. You need to keep the old domain live for a while.

Edited by Wickham

Hi Aled Mann

 

I think the same.You need to keep the old domain name and redirect it to your new site using .htaccess if the files not exist in the old site.

  • Author

OK so this is where it gets confusing...I can't keep the old site live as the nameservers now point to my hosting package.

 

Here's the full story:

 

The company has 20 domain names. They used www.beatyourmaindealer.co.uk as their main domain name and redirected the other 19 to this URL.

 

For the new site, they want to use a different domain name (from the list of 20) called www.iautouk.com

 

To do this, I have transferred all their domain names from their old hosts to my hosting provider and have pointed www.iautouk.com to the new site.

 

I have then placed a web forwarding all the other domain names to www.iautouk.com

 

I'm so confused!!

Edited by Aled Mann

I don't think it matters that you have transferred the old domain name to your hosting provider. What matters is that the old domain is live somewhere (it may take a few days for the domain to become live after the transfer). A browser looking for it will find it and even if there are no files on that domain, then the .htaccess file will redirect to the new domain.

 

I have then placed a web forwarding all the other domain names to www.iautouk.com

That may be enough. You can forward a domain name using a control panel for that domain, like cPanel, and that does what a 301 redirect does, but you have to have the old domain and a hosting package for it still live for a while.

Edited by Wickham

  • Author

Wouldn't a solution be to download all the files from the old server and host them on mine?

Wouldn't a solution be to download all the files from the old server and host them on mine?

 

You created a new Wordpress website and a new domain name, so decide which hosting provider you want the client to have for that (it's your hosting provider at present) and upload all the new Wordpress files to that server.

 

The old site's files are presumably dead and could be deleted (don't do it until you are sure). The old site can be hosted anywhere provided that it's got a 301 redirect in the .htaccess file to redirect everyone to the new domain.

 

If you use a 301 redirect from the old domain to the new domain, then individual pages on the old domain will be redirected to the index file on the new domain. You could have individual redirects for every page to the equivalent page in the new domain, but it would be a lot of code.

Edited by Wickham

I had this problem as well when a client lost access to their domain name (don't ask) and we ended up with a new domain name. Luckily we still had FTP access to the old site. Because of this, we could claim ownership of the old site and used Google Webmaster Tools to inform Google that the domain has changed name (it's called Change of Address in webmaster tools). This at least updated some of the old links in Google and then you can use the .htaccess trick as explained above on the new site. Maybe this isn't what you're looking for but it might help a little bit.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.