Post by motofox » Tue Jun 11, 2024 3:12 am

My site doesnt have the www at the start just website name, google console shows both the www version and not non www version,

on google console the www version is showing as its indexed on google so im thinking i should be using that instead as the non www one isnt indexed.

as you can see i carnt get my head around this bit, so any advise would be much appreciated on if i should change it and how.

regards

martin

New member

Posts

Joined
Wed Nov 19, 2014 10:44 pm

Post by johnp » Tue Jun 11, 2024 4:55 am

motofox wrote:
Tue Jun 11, 2024 3:12 am
My site doesnt have the www at the start just website name, google console shows both the www version and not non www version,

on google console the www version is showing as its indexed on google so im thinking i should be using that instead as the non www one isnt indexed.

as you can see i carnt get my head around this bit, so any advise would be much appreciated on if i should change it and how.

regards

martin
Try editing your config.php and admin/config.php files to show the www version.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by motofox » Tue Jun 11, 2024 5:00 am

i sussed it, thanks
johnp wrote:
Tue Jun 11, 2024 4:55 am
motofox wrote:
Tue Jun 11, 2024 3:12 am
My site doesnt have the www at the start just website name, google console shows both the www version and not non www version,

on google console the www version is showing as its indexed on google so im thinking i should be using that instead as the non www one isnt indexed.

as you can see i carnt get my head around this bit, so any advise would be much appreciated on if i should change it and how.

regards

martin
Try editing your config.php and admin/config.php files to show the www version.

New member

Posts

Joined
Wed Nov 19, 2014 10:44 pm

Post by johnp » Tue Jun 11, 2024 5:02 am

Perfect. :)

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by Elevate » Tue Jun 11, 2024 8:21 am

You need to take it one step further and put a redirect in your .htaccess file

This redirect is so that all requests for the non www URL will be forwarded to the www url

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

ELEV8TE Website Development
Available for hire - please contact me at https://www.elev8tewebsitedevelopment.com/contact
https://www.elev8tewebsitedevelopment.com


User avatar
Active Member

Posts

Joined
Fri Jul 06, 2018 12:40 am
Location - Denver, Colorado, USA

Post by Markjons » Sat Jul 13, 2024 2:56 am

Changing your site address to include "www" is a straightforward process, but it requires adjusting some settings. First, log in to your hosting account or server where your website files are stored. You'll need to find and edit a configuration file called .htaccess if your site uses an Apache server. Look for this file in your website's main directory using an FTP client or file manager provided by your hosting service.

Inside the .htaccess file, you can add a few lines of code to force your site to use 'www' in the URL. Copy and paste the following lines:

css
Copy code
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
This code checks if your site's URL doesn't start with 'www.' and redirects it to the same URL but with 'www.' included. This setup ensures that the redirection is permanent, which is important for search engine optimization and consistent user experience.

After making changes to your .htaccess file, save it and clear your browser cache. Then, test your website by typing both 'www.socialhubin.com' and 'http://www.yourdomain.com' into your browser's address bar. Both should now lead to the 'www' version of your site.

If your website uses a Content Management System (CMS) like WordPress, Joomla, or Drupal, you may also need to update the site URL settings within the CMS admin panel. In WordPress, for example, you can go to Settings -> General and modify the WordPress Address (URL) and Site Address (URL) fields to include 'www'.

Lastly, remember to monitor your site for any issues after making these changes, such as broken links or unexpected behavior. If you're unsure about editing files or making these adjustments yourself, it's wise to contact your hosting provider or a web developer for assistance.
Last edited by Markjons on Fri Jul 19, 2024 1:12 pm, edited 1 time in total.

Newbie

Posts

Joined
Fri Jul 12, 2024 5:47 pm

Post by Elevate » Sat Jul 13, 2024 10:23 am

Markjons wrote:
Sat Jul 13, 2024 2:56 am
Changing your site address to include "www" is a straightforward process, but it requires adjusting some settings. First, log in to your hosting account or server where your website files are stored. You'll need to find and edit a configuration file called .htaccess if your site uses an Apache server. Look for this file in your website's main directory using an FTP client or file manager provided by your hosting service.

Inside the .htaccess file, you can add a few lines of code to force your site to use 'www' in the URL. Copy and paste the following lines:

css
Copy code
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
This code checks if your site's URL doesn't start with 'www.' and redirects it to the same URL but with 'www.' included. This setup ensures that the redirection is permanent, which is important for search engine optimization and consistent user experience.

After making changes to your .htaccess file, save it and clear your browser cache. Then, test your website by typing both 'http://yourdomain.com' and 'http://www.yourdomain.com' into your browser's address bar. Both should now lead to the 'www' version of your site.

If your website uses a Content Management System (CMS) like WordPress, Joomla, or Drupal, you may also need to update the site URL settings within the CMS admin panel. In WordPress, for example, you can go to Settings -> General and modify the WordPress Address (URL) and Site Address (URL) fields to include 'www'.

Lastly, remember to monitor your site for any issues after making these changes, such as broken links or unexpected behavior. If you're unsure about editing files or making these adjustments yourself, it's wise to contact your hosting provider or a web developer for assistance.
Why do you copy / paste all this and not proof read it? None of this needs to be mentioned on the Opencart forum

>>>>>>> If your website uses a Content Management System (CMS) like WordPress, Joomla, or Drupal, you may also need to update the site URL settings within the CMS admin panel. In WordPress, for example, you can go to Settings -> General and modify the WordPress Address (URL) and Site Address (URL) fields to include 'www'.

ELEV8TE Website Development
Available for hire - please contact me at https://www.elev8tewebsitedevelopment.com/contact
https://www.elev8tewebsitedevelopment.com


User avatar
Active Member

Posts

Joined
Fri Jul 06, 2018 12:40 am
Location - Denver, Colorado, USA

Post by JNeuhoff » Sun Jul 21, 2024 5:14 pm

Why do you copy / paste all this and not proof read it? None of this needs to be mentioned on the Opencart forum
Markjons' OpenCart has been compromised now anyway, he started posting pornographic messages on the OC forum.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by rajdeepsinhgohil » Mon Jul 22, 2024 2:04 pm

You can redirect the www site address to the non www. Also another way is to start optimising your home page and creating backlinks for it.

for ex: my site www address is https://www.digimonksolutions.com/ and i've redirected it permanently to https://digimonksolutions.com/


Posts

Joined
Thu Jul 11, 2024 8:29 pm
Who is online

Users browsing this forum: No registered users and 9 guests