Support

Site Restoration

#40599 Duplication and CORS

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
8.1
CMS Type
Joomla!
CMS Version
5.1
Backup Tool Version
latest
Kickstart version
latest Pro

Latest post by nicholas on Thursday, 18 April 2024 07:09 CDT

bluetongue1

Hi again,

I have had some problems in regards to duplicating one site into several with the original being https://aboriginalculturalimmersions.com.au the duplicate sites bluetongue1.com and aboriginalworkshops.com.au. There is also firstnationeducation.com.au which shares some content.

The sites are for the same business but aimed at different markets. They are completely different brands. 

Each site I have changed the written content on the main sections to suit the brand names and mix the content up and have made changes the images data as well along with dropping the images from one in preference to a new slider.

I utilise SmartSlider3 which gives me plenty of room to make these changes.

I have changed the slugs on many of the menus per site, changed the names of pdf files available on the front end and the inside SEO meta data.

I have noticed in Google console I am getting stung on a lot of un indexed pages and also there where some links on the sites that threw errors with CORS blocks and there where many redirect problems causing the main domain to not index.

All the sites have their own databases

I researched and added the below with my domains and changed the config.php to suit. This fixed up the indexing of the main domain but many others still are having problems

#### Force HTTPS://WWW and remove trailing / from files ####
## Turn on rewrite engine
RewriteEngine on

# Remove trailing slash from non-filepath urls
RewriteCond %{REQUEST_URI} /(.+)/$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ https://www.example.com/%1 [R=301,L]

# Include trailing slash on directory
RewriteCond %{REQUEST_URI} !(.+)/$
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+)$ https://www.example.com/$1/ [R=301,L]

# Force HTTPS and WWW
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [OR,NC]
RewriteCond %{https} off
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

I did not have CORS turned on any site which I am now implementing. His there any advice on best practice here for duplication and allowing them to share some data. The contact sections and some other parts need to remain generic across all sites for continuity.

In global configuration --> Server --> Enable CORS "YES"


Header add Access-Control-Allow-Origin - *


Header add Access-Control-Allow-Headers - Content-Type,X-Joomla-Token


Header add Access-Control-Allow-Methods 

nicholas
Akeeba Staff
Manager

CORS is only used when you try to make an XmlHttpRequest / fetch from JavaScript code, or include static media (images, video, CSS, JS) from a different domain or subdomain than the one the site is currently hosted in.

I don't see why you'd need to do any of that in your use case, since each site is a separate entity. Is it possible that it's just a matter of configuring your slider?

Generally speaking, allowing unrestricted CORS is not a great idea as it allows any resource of your site to be loaded from any other site. At best, you may end up with a lot of traffic billed to you but not benefitting you.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

bluetongue1

Thanks Nicholas, appreciate your time.

I am just trying to research why the sites are getting so much grief from Google stating that the pages are not indexing because 'Page is not indexed: Duplicate without user-selected canonical'. This is happening to the main domain at aboriginalworkshops.com.au which as mentioned was duplicated with backup and loaded with Kickstart.

I researched and read that the CORS could help. But have turned that back off with your input. Wrong direction. Thank you.

Researching Joomla for somethings is a huge task as u know. I have changed all the slugs, meta data, main text, stripped all unused images and files, renamed files and so forth.

Unless you have any links in the right direction to help fix this problem I guess I will have to keep learning as I go.

Thanks again.

nicholas
Akeeba Staff
Manager

Page is not indexed: Duplicate without user-selected canonical

This has nothing to do with CORS. Google is telling you that you have duplicate content, i.e. different URLs with the exact same content.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!