• Resolved anshua1

    (@anshua1)


    Hello,

    I am using The SEO Framework plugin on my wordpress website. I generated the sitemap for my website using this plugin. I see that the sitemap that is getting generated is using the IP address of my website and not the domain name of my website in all the links that have been generated for my website in the sitemap. This was not an issue earlier when I had first generated the sitemap for my website a month to month and a half back using The SEO Framework plugin.

    This issue has also led to some of the search results of my website appearing with IP Address of my website on google instead of domain name.

    Request your help and guidance in this matter.

    Regards,
    Anshu

Viewing 9 replies - 1 through 9 (of 9 total)
  • @anshua1 i think thats a server problem.. a wrong code in httacces file… not the plugin!

    Thread Starter anshua1

    (@anshua1)

    @onestatero Thanks for your reply. Request if you could provide guidance on the nature of fix required in the htaccess file. Thanks.

    @anshua1 something like this:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^12\.34\.56\.789/$1
    RewriteRule ^(.*)$ https://www.domainname.com/$1 [L,R=301]

    ask yout host to do it!

    Hey Antonio – I am hosting my own site on AWS and I having the same issue. Question: Is there any danger to using your code? Can it mess with SEO? Is there a chance it will break the site?

    Currently I have this:

    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    So I just replace with your code (of course using my IP and URL…)? Thanks.

    @squasha thats basic wordpress httacces code.. you cant modify that! its basic! code provided above is another rule in httacces .

    Thanks for the reply Antonio. I am definitely not a developer so this is pretty new to me.

    Ok, so don’t replace the basic code. So I just add you code after it? For example, today it looks like this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    So now I just want to change it to:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^MY.IP.ADDRESS/$1
    RewriteRule ^(.*)$ https://www.mydomain.com/$1 [L,R=301]

    Is it that easy? Just add your block of code after the basic code? No other wrapper or anything?

    Thanks!

    @squasha put it above wp basic code!

    Apologies, I’m just not familiar with the syntax of this code. I see much of the code has a “<IfModule” wrapper. Does you code need that too? Or can I put it within the <IfModule wrapper that is at the beginning of the basic WP code? Like this?

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^MY.IP.ADDRESS/$1
    RewriteRule ^(.*)$ https://www.mydomain.com/$1 [L,R=301]
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    The IfModule-wrapper is there to prevent errors. It’s ‘best practice’ but not necessary.

    What you have there looks good. You may want to lock the file; see the article below — there’s a part about .htaccess too.

    Changing File Permissions

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘My website’s sitemap is getting generated from IP address of my website’ is closed to new replies.