I have made a change to my website from non-www to www since i saw many google owned websites use www in front of the domains.. so i though why not me too. But after making the change i did a google search on the same topic and came up to many different answers from the communities.

I also ask BARD and ChatGPT about the same topic and they both gave me same positive answers, that this change may be good for long run SEO.

So why not ask DaniWeb community too? :)

What do you guys thing about this? Did i make good choice for this or not?

P.S: CloudFlare team recommended me this change since i was getting errors Invalid SSL Certificate (Error 526)
I am still getting the error but they are 100% sure it will not show up anymore if i wait few days.

AussieWebmaster commented: Either works just don't have both - redirect one to the other - and hope you have https not http +5

Recommended Answers

All 17 Replies

As someone who has been in the SEO industry for over two decades, it doesn't really matter if you use www or non-www. All that is important is that, whichever you choose, you stick to it. That means that all links on the web (social media, etc.) point to the same version of your domain. All internal links on your website point to the same version of your domain (if they are not relative links). All that matters is that you're consistent.

If you have canonical links set up in your HTML, make sure they reference the new www version of your domain. You will also want to make sure you have redirects set up to redirect every non-www URL to its www counterpart with HTTP 301 Permanent Redirect. Make sure you're not using 302 temporary redirects, as that sends a different signal to Google.

Since you've switched, you will also want to create a Google Search Console property with the https://www. version of your domain. I'm not sure if you're already using Search Console (you should be!) but, if you already are, you'll need to create a new property.

I believe Google Analytics also requires a different property to be set up and differentiates between www and non-www.

As far as whether it was a good choice, that's up to you. Google doesn't care.

Also, Cloudflare support is never ideal. I have no clue why they would recommend you switch to the www version if you're getting an SSL certificate error. It seems to me as if the SSL certificate was not properly installed, and switching will not solve that problem.

I was about to ask next about the Google Search Console whether i should make new property with www or not.
So now i made the new property, should i delete the old one, or just leave it like it is?
Google wont get confused on which property should crawl?
I will also make a dynamic sitemap that is generated with PHP with the www in the domain.
Till now i was not using any sitemap. Google was crawling my website on its own...

Google won’t get confused as long as you implement 301 redirects from non-www to www. The benefit of keeping both search console accounts is you can keep track and see that Google is stopping/slowing down crawling the old one and no longer indexing it.

If Google search console is still showing you indexed pages for the non-www property, then you know you have a technical SEO problem you’ll need to solve.

Google won’t get confused as long as you implement 301 redirects from non-www to www.

I have code in .htaccess file
`

# Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

`

Is this good enough?

I also have another question related to seo.
I have custom landing page on some of the products and i am using this kind of URL structure.
https://www.kupisi.mk/pametno-indukcisko-resho (this page is the LP for the product)
And this is the actual product page
https://www.kupisi.mk/product/за-дома/паметно-индукционо-решо/50
Take a look at the fonts they are different.

My question is should i keep the same font for the whole website or can i use different kind of font?
Because the link structure is written in Cyrillic font.

They both mean the same in my language just different font some people use

I don't have personal experience with multilingual websites or non-English websites to be able to advise you on what's best. However, I would advise you that while it's appropriate to use multiple fonts, you want to ensure the entire website has a consistent look and feel, navigational structure, and design language. Otherwise it will be very confusing to the end user and not a good experience, and Google realizes that.

Alright, got it! So Google is smart enough to realize that pametno-indukcisko-resho and паметно-индукционо-решо mean the same in my language.

Thank you so much for the help Dani!

Just as an update to this thread. I noticed weird link structure getting indexed on google after i created the new property with www version.
Take a look how my links are getting indexed

https://www.kupisi.mk/product/index.php?mainCategory=за-дома&productName=елегантен-кујнски-мијалник-од-нерѓосувачки-челик&product_id=44

https://www.kupisi.mk/product/за-дома/паметен-прекидач-за-светло-со-две-копчиња/46

https://www.kupisi.mk/product/index.php?mainCategory=За-Кола&productName=Полнач-за-телефон-за-во-кола&product_id=39

https://www.kupisi.mk/product/index.php?mainCategory=за-дома&productName=глава-за-туш-со-филтер-за-прочистување-вода&product_id=41

https://www.kupisi.mk/shop/

https://www.kupisi.mk/product/index.php?mainCategory=За-Дома&productName=Кујнски-мијалник-од-нерѓосувачки-челик-inox&product_id=28

Why is this happening to me and how can i edit them to look properly without the URL parameters names ?

Screenshot_2024-03-24_182352.png

i am using this code in htaccess file to rewrite the URL's

# Rewrite product URLs
RewriteRule ^product/index\.php$ - [L]
RewriteCond %{QUERY_STRING} mainCategory=([^&]+)&productName=([^&]+)&product_id=([^&]+)
RewriteRule ^product/index\.php$ /product/%1/%2/%3? [L,R=301]
RewriteRule ^product/([^/]+)/([^/]+)/([^/]+)/?$ product/index.php?mainCategory=$1&productName=$2&product_id=$3 [L]

Make sure that every page has the correct link rel=canonical html tag set to tell Google what the one and only URL to the page is.

Ensure there are no internal links anywhere in your site that use this wrong version of the URL.

Remember, Google is finding this wrong URL somewhere! It’s not making it up :)

Ideally, implement 301 redirects from the wrong version of the page to the correct version.

Make sure that every page has the correct link rel=canonical

Where should i place this tag ?

Ensure there are no internal links anywhere in your site that use this wrong version of the URL.

I ensured and updated the search.php file which was redirecting to non-www version, now is fine.

Ideally, implement 301 redirects from the wrong version of the page to the correct version.

How do i do this? I already have that rule in the .htaccess file. This should be in somewhere else place ?

UPDATE:
I did add the canonical html tag like this

$product_url = "https://" . $_SERVER['HTTP_HOST'] . "/product/" . urlencode($mainCategory) . "/" . urlencode($productName) . "/$productID";

<link rel="canonical" href="<?php echo htmlspecialchars($product_url, ENT_QUOTES, 'UTF-8'); ?>">

And i am getting results like this

<!-- CANONICAL URL -->
<link rel="canonical" href="https://www.kupisi.mk/product/%D0%B7%D0%B0-%D0%B4%D0%BE%D0%BC%D0%B0/%D1%83%D0%BD%D0%B8%D0%B2%D0%B5%D1%80%D0%B7%D0%B0%D0%BB%D0%BD%D0%BE-%D0%BF%D0%B0%D0%BC%D0%B5%D1%82%D0%BD%D0%BE-%D0%B4%D0%B0%D0%BB%D0%B5%D1%87%D0%B8%D0%BD%D1%81%D0%BA%D0%BE/18">

I just updated the canonical url structure format into Cyrillic characters.

$canonical_product_url = "https://" . $_SERVER['HTTP_HOST'] . "/product/$mainCategory/$productName/$productID";
$product_url = "https://" . $_SERVER['HTTP_HOST'] . "/product/" . urlencode($mainCategory) . "/" . urlencode($productName) . "/$productID";


<!-- CANONICAL URL -->
<link rel="canonical" href="<?php echo $canonical_product_url; ?>">

and now the canonical url is like this

<!-- CANONICAL URL --> <link rel="canonical" href="https://www.kupisi.mk/product/за-дома/кујнски-мијалник-од-нерѓосувачки-челик-inox/28">

Is that what you want your preferred URLs to look like?

commented: Yes, thats correct way of displaying and reading in my language +0

You are correctly implementing 301 redirects in an .htaccess file. Ensure that the redirects point to the exact same URL as you have in the canonical.

Additionally, ensure that all internal links throughout your site point to that same URL as well.

I guess that’s changed since I submitted my site what I feel like is at least a decade ago.

If you using the permanent redirection then there is No problem, when the user enter your non www version it redirects to www version. As Dani told you have to change your Google Analytics property and google Search Console property from non www to www version.

commented: Got it! On it! BIG THANKS +0

Changing your website from non-www to www can have benefits for SEO consistency and branding, but the impact may vary depending on your specific circumstances. It's generally considered a good practice for long-term SEO, as it can help standardize your URL structure and improve domain authority. However, it's important to implement proper redirects and inform search engines of the change to avoid any negative effects on existing rankings. Overall, if done correctly, the change can be beneficial for your website's SEO in the long run.

This doesn't matter as much in terms of SEO and as per my experience it ain't a ranking signal, it just help the users to open the website if they search it using "www". Adding on, it just help you in technical aspects.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.