jimbojames85

301 redirect domain name and all URL paths remain the same

by @jimbojames85 (130), 4 years ago

Hi all,

Firstly, I'm new to this forum, so thank you for having me.

I've started a blog and it's got around 10 articles. There's not many pages and I'm not going to change the URL path.

However, I started with the domain: your-domain.com and yesterday: yourdomain.com was available, so I bought it.

As the site, is 8 weeks odd, in the short term it shouldn't have much impact on the rankings, as everything is on page 10.

My question is:

Is there a quicker way of doing domain level redirect in .htaccess?

Eg.

If: your-domain.com/blog-post can change to : yourdomain.com/blog-post

The old school way is redirect every single page. However, I'm looking for the page to be lightning fast, so if I can reduce the number of 301's that'll be smashing.

Thanks in advance

James

2293 Views
0 Upvotes
5 Replies
4 Users
Sort replies:
ms
by @ms (4326), 4 years ago

Hi James, welcome to Seo Forum.

What you described is typical use case for 301 redirect. The redirect itself is quick enough. So, as long as you're not chaining multiple redirects, you're fine and single A -> B redirect is what you're looking for.

What do you mean by reducing number of redirects? How many redirects you see in your Network (Browser Console) tab?

jimbojames85
by @jimbojames85 (130), 4 years ago

Hi there,

I've got to sorted. I've done this:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [L,R=301,NC]

Thanks anyway

ms
by @ms (4326), 4 years ago

Looks good, good to see you've got it to work.

bestbusinessbackpack
by @bestbusinessbackpack (105), 4 years ago

thanks for sharing good content

Subhodip
by @Subhodip (115), 4 years ago

If you want to change your domain from "your-domain.com" to "yourdomain.com" permanently, then you should use 301 redirections. Or, you can mark your website "yourdomain.com" as canonical of website "your-domain.com". These are prevalent and accessible techniques. You also can use 302 redirections, if you are not changing permanently.

Join the forum to unlock true power of SEO community

You're welcome to become part of SEO Forum community. Register for free, learn and contribute.

Log In Sign up
SEO Directory for agencies
Want to see your Ad here?

Do you have a product or service you'd like to promote on Seoforum? It's easy. Contact us.