• Hi,

    I have had a problem with changing my websites URL in the WordPress backend which I could not really resolve despite searching for solutions. It seems that I am having a problem of a more difficile nature. Below I do not use domain names that I own, they are just examples for better understanding.

    Situation:
    My domain abc.com is registered at “All-inkl” and it is redirected to the actual content (web space) at “Arvixe” (uses cpanel). So at “All-inkl” I have added the nameserver from “Arvixe” and the redirection works fine so far.

    At “Arvixe” I have a “main domainxyz.com that basically comes with the web hosting package. My wordpress-site for the domain abc.com is located in an own folder (“folderX“) on xyz.com (xyz.com/public_html_folderX). This is also set up in the domain setting in cpanel (goes there under the name “Addon Domain”) as “document root“. Also there comes an automatic redirection (“redirects to“): https://abc.com/(https?|ftp|php)\://
    Additionaly to that adding another domain automatically seems to create a sub-domain: “abc.xyz.com” that is located at the same document root and also includes an automatic redirection “https://abc.xyz.com/(https?|ftp|php)\://“. Also my wordpress site’s plugin All-in-one-WP-Security creates several redirections (via .htaccess) that can be seen in cpanle in “Redirections” (don’t know if this could also have an impact?).

    The site itself is accessible under “abc.com“, “abc.xyz.com“, “xyz.com/folderX” (latter brings you not to the main page, but to a page-not-found page).

    What I tried:

    For SEO reasons (I use the Yoast SEO-plugin) I wanted to make changes to the WordPress URL-setting in general settings in the backend. So I followed the guide here and here (or at least I thought so). While reading the above guides I stumbled across the guide regarding an own wordpress directory here. I found out, that I have an own directory for wordpress (which was/is actually working), but I did not do step 7: “Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address).“. So I thought I could change the site’s URL for SEO reasons and also to that step with copying the .htaccess file and index.php to the root and doing the related changes in index.php.
    Note: I overwrote (without backing up) the existing .htaccess-file in the root (which seemed to be pretty empty). The .htaccess file I copied contained security settings for “abc.com“.

    After that I could not log in back to the administration panel of “abc.com“. After some confusion I edited “abc.com’s” wp-config and manually added the 2 urls you could normally edit in backend’s general settings. Now they are both https://www.abc.com/ (with that “/” in the end). I’ve also removed/changed the .htaccess and index.php in the root folder. Now it seems to be working again and also “xyz.com” seems to be working though it is and was in maintenance mode all the time.

    Unfortunately I can’t remember everything I did and tried out, but several questions regarding this remained.

    1. Is it possible that this whole URL-change stuff does not work properly when redirecting a domain to a different hosting provider?

    2. My site seems to be working without having index.php and .htaccess in the root folder setup to point to the wordpress installation of “abc.com“. I think that I also have this on another site of mine. Why bother applying the stuff with .htaccess and index.php?

    3. I’m planning to make a wordpress site for the “main domain” “xyz.com” in the root directory. Wouldn’t this mean that there is a problem when I have a .htaccess and index.php file serving “xyz.com” and also “abc.com” if I would to it as told in the guide?

    4. Does it for SEO actually really matter whether the sites URL is with or without “www” (rf. here )? That was why I even started working on that?

    5. No I have the 2 URLS (WP and site) coded in wp-config.php. Can I leave ti that way or should I try to change it?

    I thank for all tipps and hints in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Knordelia

    (@knordelia)

    Great, I forgot another question related to this:

    6. How can I disable that I can access my site “abc.com” via “abc.xyz.com” and “xyz.com/folderX? Is this even possible and necessary or recommended?

    Thread Starter Knordelia

    (@knordelia)

    Does anyone have a idea or is it too complicated?

    Sorry, I don’t know if I could have described the situation any shorter without not mentioning sufficient details.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘URL-change in redirected website’ is closed to new replies.