jimbojames85

301 redirect domain name and all URL paths remain the same

by @jimbojames85 (126), 1 week 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

37 Views
0 Upvotes
3 Replies
2 Users
Sort replies:
ms
by @ms (1239), 4 days 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 (126), 4 days 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 (1239), 2 days ago

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

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